Reputation: 402
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:
`[email protected] 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! [email protected] preinstall: node ./lib/preinstall_npmcheck.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] 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
Upvotes: 0
Views: 1925
Reputation: 174
I got the same errors.
npm -g install sails
But it worked when I ran command line as administrator.
Upvotes: 2
Reputation: 402
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.
Upvotes: 1