5

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! v8-debug@0.4.6 install: node-pre-gyp install --fallback-to-build npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the v8-debug@0.4.6 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.

user472292
  • 1,069
  • 2
  • 22
  • 37

2 Answers2

7

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.

Mike Horstmann
  • 580
  • 2
  • 9
  • 1
    Unfortunatly, I've tried all those steps to no avail. I have a full install of VS. – user472292 Sep 11 '15 at 03:56
  • @user472292 as mentioned above it's unlikely your Visual Studio (C++) installation is affecting node-gyp. Sometimes your Python installation folder set to the environment variable for Python is set to the wrong version. It's possible to fix it if you uninstall nodejs using windows add/remove a program. Also add/remove for the python installation and then install both again using chocolatey. Make sure you open your command line "as administrator" when you do any of these installs also! Sometimes that can also make an install wonky if you're not on an admin command line in windows. – Mike Horstmann Oct 31 '15 at 04:01
  • 1
    Didn't work, but thanks for mentionning that node-gyp is a bloody nightmare – Nino Filiu Nov 21 '18 at 15:01
0

All i did is uninstall node and install it again, and during the installation, check the box telling you to install the needed dependencies and complete your installation.

If it persists, locate the package that is causing this error and install it seperately. Example: npm install -g node-gyp npm install bcrypt