Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

NPM Install Error - Node-Pre-Gyp

Tags:

node.js

npm

When I try to run npm-install I get:

npm ERR! Windows_NT 6.3.9600 npm ERR! argv "C:\Program Files (x86)\nodejs\node.exe" "C:\Program Files (x8 6)\nodejs\node_modules\npm\bin\npm-cli.js" "install" npm ERR! node v4.0.0 npm ERR! npm v2.14.2 npm ERR! code ELIFECYCLE

npm ERR! [email protected] install: node-pre-gyp install --fallback-to-build npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the [email protected] install script 'node-pre-gyp install --fal lback-to-build'. npm ERR! This is most likely a problem with the v8-debug package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! node-pre-gyp install --fallback-to-build npm ERR! You can get their info via: npm ERR! npm owner ls v8-debug npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request: npm ERR! C:_Src\Personal\rzaleski\ILikeThis\npm-debug.log

I tried a number of things (installing VS C++ redistrib, npm install --msvs_version=2013, etc). Nothing seems to work.

Do you have any ideas how I can find out the actual error (the log is a bit daunting).

UPDATE: What I ended up doing was reverting from Node v4.0.0 to NODE v0.12. This is not really a fix to the issue, but it got me around my issues.

like image 644
user472292 Avatar asked Sep 11 '15 00:09

user472292


1 Answers

Go to: (http://www.devdocs.io) look @ the npm section. Must use desktop, must use windows if possible (Mac layout is weird for some reason) Follow the steps detailed for "resetting npm cache"

Node-gyp is a P.I.T.A. and often blows up installs among other things. I have a horrible time with it every time I come back to an environment I haven't used in a while and try to use it again.

Alternatively, you can uninstall node, and attempt to reinstall using chocolatey if you're on windows or brew if you're on a mac. Make sure you sudo commands when installing to mac.

You're most likely going to have to clean out the npm cache, possibly reinstall nodejs, and possibly reinstall node-gyp.

NOTE: Before you go about the above mentioned steps, first make sure that your configurations are compatible, including your python version for node-gyp. (https://www.npmjs.com/package/node-gyp) Also, I have solved the C++ redistributable issues several times without touching anything C++ related, just so you know this error is not indicative of C++, but rather local settings and compatible software versions that interact with node + npm NOT C++ related (for instance, your python version interacting with node-gyp)

There is no straightforward "run this and that" to fix, you kind of have to muddle through it, and I can promise you that you'll have to do it more than once. But the more you fix node + npm + node-gyp, the more able you will be to quickly remedy all issues in the future. The links above should sort you out no problem though. Just walk through them slowly and thoroughly as instructed.

like image 108
Mike Horstmann Avatar answered Nov 13 '22 13:11

Mike Horstmann