Comments (8)
I did a bit of digging and found the following.
instalArchSpecificPackage
figures out which node-{platform}-{architecture} package to install by getting the process.platform
and process.arch
values from NodeJS.Process
unfortunately, process.arch
only has the following possible values
'arm', 'arm64', 'ia32', 'mips', 'mipsel', 'ppc', 'ppc64', 's390', 's390x', 'x32', and 'x64'.
The node packages that are available on npmjs.org use a different naming convention and spell out the specific architecture version node-linux-arm64
or node-linux-armv7l
or node-linux-armv6l
. They follow the naming convention of binaries on nodejs.org
relevant bit of code from instalArchSpecificPackage from node-bin-setup function below
var platform = process.platform == 'win32' ? 'win' : process.platform;
var arch = platform == 'win' && process.arch == 'ia32' ? 'x86' : process.arch;
var cp = spawn(platform == 'win' ? 'npm.cmd' : 'npm', ['install', '--no-save', ['node', platform, arch].join('-') + '@' + version], {
stdio: 'inherit',
shell: true
})
Note how there's additional handling for windows flavor of process.arch. Similar additional handling needs to be added for arm architecture.
from node-bin-gen.
similar issue with M1 chip: #124
from node-bin-gen.
View the solution to the similar issue: #124
from node-bin-gen.
Any update on the issue ? Just trying to install an existing project on a Raspberry Pi 3 and got the same error (architecture being armv7l
.
from node-bin-gen.
Hey Guys,
I got the same problem --> I want to install my docker container which has node in its package.json on a raspbian stretch lite Raspberry Pi via yarn/npm install and get the same error:
`error /usr/src/app/node_modules/node: Command failed.
Exit code: 1
Command: node installArchSpecificPackage
Arguments:
Directory: /usr/src/app/node_modules/node
Output:
npm ERR! code E404
npm ERR! 404 Not Found - GET https://registry.yarnpkg.com/node-linux-arm - Not found
npm ERR! 404
npm ERR! 404 '[email protected]' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2019-05-07T08_24_01_424Z-debug.log
internal/modules/cjs/loader.js:613
throw err;
^
Error: Cannot find module 'node-linux-arm/package.json'
Require stack:
- /usr/src/app/node_modules/node/installArchSpecificPackage.js
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:610:15)
at Function.resolve (internal/modules/cjs/helpers.js:21:19)
at ChildProcess. (/usr/src/app/node_modules/node-bin-setup/index.js:18:27)
at ChildProcess.emit (events.js:196:13)
at maybeClose (internal/child_process.js:1000:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:267:5)`
The answer describes really nice what the problem is, but how can I solve this? I need to install node in the docker container when building it. I found a way to install node globally on my Pi, but how can I install it in my container when building it on the Pi?
It would be so great if anybody could help me.
Thank you very much in advance :)
from node-bin-gen.
We really need this issue resolved: #126
from node-bin-gen.
Any updates? Making it very difficult to develop from a pi.
from node-bin-gen.
Somehow there is already a discussion about this fix but not linked to here:
#57
aredridel/node-bin-setup#2
from node-bin-gen.
Related Issues (20)
- Cannot install on Apple's new M1 chip HOT 6
- Why do I get two different file sizes for node 16.13.1, depending on when I pulled from npm? HOT 1
- Can we get new versions of npm node-win-x64 packages? HOT 5
- node 18 HOT 2
- Cannot install Node on M1 Max HOT 3
- No matching version found for [email protected] HOT 1
- License for generated packages? HOT 2
- New lts version HOT 3
- Node 18.13.0 HOT 2
- Could there be a more effective way to keep up the Node.js binary updating pace? HOT 4
- No matching version found for [email protected] HOT 3
- Node 18.16.0 on NPM
- New versions HOT 1
- Darwin-arm64 package for 16.11.1 HOT 4
- Memory leak - Base class instance HOT 3
- Version 18.17.1 HOT 1
- Node 18.18.0 HOT 1
- New LTS version HOT 1
- LTS version HOT 1
- Facing http-parser error when i run command ng serve HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from node-bin-gen.