I get this error message when I run "npm install socket.io." Can anyone help with this? Is the main problem with the "ws#0.5.0 script," whatever that is?
Also, what does the "node-gyp rebuild 2> builderror.log" mean? I've head that Python may be related to this problem, but I don't really know how.
Thanks a lot for your help!
$ npm install --save socket.io
npm WARN package.json famedu#1.0.0 No description
npm WARN package.json famedu#1.0.0 No repository field.
npm WARN package.json famedu#1.0.0 No README data
|
> ws#0.5.0 install
c:\codeprojects\famedu\node_modules\socket.io\node_modules\en
gine.io\node_modules\ws
> (node-gyp rebuild 2> builderror.log) || (exit 0)
/
> ws#0.4.31 install
c:\codeprojects\famedu\node_modules\socket.io\node_modules\s
ocket.io-client\node_modules\engine.io-client\node_modules\ws
> (node-gyp rebuild 2> builderror.log) || (exit 0)
npm ERR! ws#0.5.0 install: `(node-gyp rebuild 2> builderror.log) || (exit
0)`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the ws#0.5.0 install script.
npm ERR! This is most likely a problem with the ws package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! (node-gyp rebuild 2> builderror.log) || (exit 0)
npm ERR! You can get their info via:
npm ERR! npm owner ls ws
npm ERR! There is likely additional logging output above.
npm ERR! System Windows_NT 6.1.7601
npm ERR! command "c:\\Program Files\\nodejs\\node.exe" "c:\\Program
Files\\nodej
s\\node_modules\\npm\\bin\\npm-cli.js" "install" "--save" "socket.io"
npm ERR! cwd c:\codeprojects\famedu
npm ERR! node -v v0.10.35
npm ERR! npm -v 1.4.28
npm ERR! syscall spawn
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! not ok code 0
You need to have both python 2.x and Visual Studio (Express Edition or higher) installed in order to build native dependencies on Windows.
ws is short for web socket; it's a socket client -- see https://www.npmjs.com/package/ws -- and ws needs to be compiled as a binary add-on.
There have been a lot of improvements to npm -- especially around conflicts and race conditions during install -- since 1.4.28. Can you try updating your npm installation?
To update npm on Windows, follow the instructions here: https://github.com/npm/npm/wiki/Troubleshooting#upgrading-on-windows
Related
Sails.js will not install, but just to make sure npm is working I installed grunt
npm install -g grunt-cli and it installed correctly.
But when I run npm install -g sails I get an error.
Command prompt error:
`sails#0.11.0 preinstall C:\Users\User\AppData\Roaming\npm\node_modules\sails
node ./lib/preinstall_npmcheck.js
Sails.js Installation - Error
Unable to check your npm-version
Please reinstall npm to use Sails.js
npm ERR! Windows_NT 6.3.9600
npm ERR! argv "C:\Program Files (x86)\nodejs\node.exe" "C:\Program Files (x86)\nodejs\node_modules\npm\bin\npm-
cli.js" "-g" "install" "sails"
npm ERR! node v4.0.0
npm ERR! npm v2.14.2
npm ERR! code ELIFECYCLE
npm ERR! sails#0.11.0 preinstall: node ./lib/preinstall_npmcheck.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the sails#0.11.0 preinstall script 'node ./lib/preinstall_npmcheck.js'.
npm ERR! This is most likely a problem with the sails package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node ./lib/preinstall_npmcheck.js
npm ERR! You can get their info via:
npm ERR! npm owner ls sails
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! C:\Windows\system32\npm-debug.log`
npm-debug.log:
https://gist.github.com/anonymous/c850ac8c71e0410db020
I got the same errors.
npm -g install sails
But it worked when I ran command line as administrator.
I solved this by running npm install -g sails --ignore-scripts.
The only thing I can think of is for some reason I don't have ./lib/preinstall_npmcheck.js file and it is trying to run it, so by ignoring it I don't get the error, hence the successful install.
I still don't understand why, but I hope this helps someone.
I'm trying to install PhantomJS 2 for a project that requires support for mutation observers. When I use the following command:
npm install phantomjs2 --save-dev
I get the following error:
Unexpected platform or architecture: win32 x64
npm ERR! phantomjs2#2.0.0 install: `node install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the phantomjs2#2.0.0 install script.
npm ERR! This is most likely a problem with the phantomjs2 package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node install.js
npm ERR! You can get their info via:
npm ERR! npm owner ls phantomjs2
npm ERR! There is likely additional logging output above.
npm ERR! System Windows_NT 6.1.7601
npm ERR! command "c:\\Program Files\\nodejs\\node.exe" "c:\\Program Files\\nodej
s\\node_modules\\npm\\bin\\npm-cli.js" "install" "phantomjs2" "--save-dev"
npm ERR! cwd g:\Web\GitHub\pet
npm ERR! node -v v0.10.26
npm ERR! npm -v 1.4.3
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! g:\Web\GitHub\pet\npm-debug.log
npm ERR! not ok code 0
I am using 64 bit Windows 7. Is PhantomJS 2 just not supported on my platform?
Yes, that package currently doesn't support installing PhantomJS 2 on Windows. Just download it from the official page and put the exe in a directory that is in the PATH.
Im trying to install multiple packages in different child processes. And all the packages have some common dependency(browserify in my case).
example
|
|_pkg1
| |_browserify
|
|_pkg2
| |_browserify
|
|_pkg3
| |_browserify
|
|_run.js
run.js:
var packages = ['pkg1', 'pkg2', 'pkg3'];
packages.forEach(function(pkg){
exec('npm install ./' + pkg);
});
And node run.js fails with log
npm ERR! Windows_NT 6.3.9600
npm ERR! argv "c:\\Program Files\\nodejs\\\\node.exe" "c:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "i
nstall" "./pkg3"
npm ERR! node v0.12.2
npm ERR! npm v2.7.4
npm ERR! path C:\Users\Artem\AppData\Roaming\npm-cache\acorn\0.9.0\package\package.json
npm ERR! code EPERM
npm ERR! errno -4048
npm ERR! Error: EPERM, rename 'C:\Users\Artem\AppData\Roaming\npm-cache\acorn\0.9.0\package\package.json'
npm ERR! at Error (native)
npm ERR! { [Error: EPERM, rename 'C:\Users\Artem\AppData\Roaming\npm-cache\acorn\0.9.0\package\package.json']
npm ERR! errno: -4048,
npm ERR! code: 'EPERM',
npm ERR! path: 'C:\\Users\\Artem\\AppData\\Roaming\\npm-cache\\acorn\\0.9.0\\package\\package.json',
npm ERR! parent: 'syntax-error' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
Example: https://github.com/SakerONE/multiple-npm-install
Works fine with npm 2.9.1
Just try to upgrade your npm
npm install npm#latest -g
This seems to be a tricky bug in npm, most probably, a race condition of parallel tasks writing the same package.json.
You can use --force flag to avoid cache (but it might be slow to download all dependencies on each build). Or wait for npm team to implement a permanent fix.
Related links to watch on Github:
https://github.com/Microsoft/vso-agent-tasks/issues/323
https://github.com/npm/npm/issues/2500
https://github.com/npm/npm/issues/9696
I am trying to run through the angular-phonecat tutorial. npm install failed for me, so I installed the packaged individually, except for karma which fails for me. Can someone help me solve this issue. ws compilation seems to be a known issue for windows, and the solution given for it is to update npm or reinstall nodeJs, i have done both of that, and I still get the error below. Please help.
$ npm install -g karma
npm WARN optional dep failed, continuing fsevents#0.3.1
ws#0.4.32 install C:\Users\user\AppData\Roaming\npm\node_modules\karma\node_
modules\socket.io\node_modules\socket.io-client\node_modules\ws
(node-gyp rebuild 2> builderror.log) || (exit 0)
npm ERR! ws#0.4.32 install: `(node-gyp rebuild 2> builderror.log) || (exit 0)`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the ws#0.4.32 install script.
npm ERR! This is most likely a problem with the ws package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! (node-gyp rebuild 2> builderror.log) || (exit 0)
npm ERR! You can get their info via:
npm ERR! npm owner ls ws
npm ERR! There is likely additional logging output above.
npm ERR! System Windows_NT 6.0.6002
npm ERR! command "c:\\Program Files\\nodejs\\node.exe" "c:\\Program Files\\nodej
s\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "karma"
npm ERR! cwd c:\JavaScript\angular-phonecat
npm ERR! node -v v0.10.33
npm ERR! npm -v 1.4.28
npm ERR! syscall spawn
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! not ok code 0
when i run the installation process and put npm install in the command line after running some processes it gives me this :
npm ERR! safefs#3.0.6 preinstall: `node ./cyclic.js`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the safefs#3.0.6 preinstall script.
npm ERR! This is most likely a problem with the safefs package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node ./cyclic.js
npm ERR! You can get their info via:
npm ERR! npm owner ls safefs
npm ERR! There is likely additional logging output above.
npm ERR! System Windows_NT 6.1.7601
npm ERR! command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nod
ejs\\node_modules\\npm\\bin\\npm-cli.js" "install"
npm ERR! cwd C:\Users\Class Talkies\Desktop\www\web-starter-kit-master
npm ERR! node -v v0.10.33
npm ERR! npm -v 1.4.28
npm ERR! syscall spawn
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! not ok code 0
I also got a few errors upon installing via the npm install command, but in order to get it to go away I relaunched command prompt in administrator mode. It solved the problem easily.
Hope it helps!