Windows 8 : `node-gyp rebuild` Exit status 1 insta

2019-05-12 08:54发布

问题:

I'm trying to install zombie js, and get this error:

> contextify@0.1.8 install
C:\Users\User\Documents\ArbeitPhilipp\clieman\billing\node_modules\zombie\node_modules\jsdom\node_modules\contextify
> node-gyp rebuild

Das System kann den angegebenen Pfad nicht finden.

C:\Users\User\Documents\ArbeitPhilipp\clieman\billing\node_modules\zombie\node_modules\jsdom\node_modules\contextify>node "C:\Program Files (x86)\nodejs\nod
e_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild
gyp ERR! configure error
gyp ERR! stack Error: spawn ENOENT
gyp ERR! stack     at errnoException (child_process.js:980:11)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:771:34)
gyp ERR! System Windows_NT 6.2.9200
gyp ERR! command "node" "C:\\Program Files (x86)\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd
C:\Users\User\Documents\ArbeitPhilipp\clieman\billing\node_modules\zombie\node_modules\jsdom\node_modules\contextify
gyp ERR! node -v v0.10.24
gyp ERR! node-gyp -v v0.12.2
gyp ERR! not ok

I work on Windows 8 (64x)

Node: v0.10.24 (32)

npm: 1.3.21

Python: 2.7 (32)

Way to Python is in PATH (C:\Python27\python.exe;) PYTHONPATH : C:\Python27\ PYTHON : C:\Python27\python.exe

npm install --verbose contextify 2>&1 | grep gyp

gives as output:

C:\Users\User\Documents\ArbeitPhilipp\clieman\billing\node_modules\contextify>node    "C:\Program Files (x86)\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\n
ode_modules\node-gyp\bin\node-gyp.js" rebuild
gyp npm verb unsafe-perm in lifecycle true
npm ERR! contextify@0.1.8 install: `node-gyp rebuild`
npm ERR!     node-gyp rebuild

I've already read all issues to this topic, but no found desicion has helped me.

I would appreciate any help very much!

回答1:

If someone else is coming up on this: We tracked it down (debugging by hand..) to some node binding script that executes node.exe while creating the build script for msbuild.

the binding.gyp from contextify contains: 'include_dirs': ["<!(node -e \"require('nan')\")"],

Which produces the: Das System kann den angegebenen Pfad nicht finden (The System Cannot Find the Path Specified)
Even with this knowledge that somehow python cannot call the node.exe and find the require("nan") module we gave up on this. If anywone has more insights that we do, please share. I have sleepless nights because of this ;)



回答2:

I had similar issue or I'd even say exactly the same! Finally (while running node-gyp rebuild / npm install) I've noticed a message an error msg stating "MSBUILD : error MSB4132: The tools version "2.0" is unrecognized. Available too ls versions are "4.0"."

Google gave me this as an answer = https://github.com/chjj/pty.js/issues/60 "Install a visual studio express 2013(desktop with c++ redist), this will help"

You can download it here: http://www.microsoft.com/en-gb/download/details.aspx?id=40787

cmd as admin -> npm install -> everything works just fine!:D

Hope that helps!

Cheers Greg



回答3:

download visual studio express 2013 here: http://www.microsoft.com/en-us/download/details.aspx?id=43729



回答4:

I was having the same problem and tried a number of solutions posted on here (installing various Microsoft VS distributions from different years), to no avail. I eventually got it working though. It's possible that a combination of them got them working for me other than these steps, but here's what I think was the solution:

  • Install Python 2.7. The easiest way to do this is to use Chocolatey, so all you have to do is type choco install python2
  • Install Visual Studio Express 2013 for Windows Desktop. Again with Chocolatey, you'd just type choco install visualstudioexpress2013windowsdesktop which will ensure you download the right one.

After installing these, update the environment variable for Python. Chocolatey will install it in C:\tools\python2. Finally, don't forget to close and reopen your command prompt.



回答5:

I recommend going for a machine that has *nix. Use someone's in your office if you don't have one. I don't remember how I did I resolve when I had this error while building strongloop and the kinds. However, most of the red messages being shown on consoles were warnings, not all were errors !! Ignore and only take errors to fix.

Working with MS dependencies + python + X-bit architecture + node-gyp rebuild permutations & combinations will reduce confidence levels more than they pay.



回答6:

This is an old question, but may this info help someone.

If you prefer only to install microsoft visual C++ 2013 dist, you can download the package provided by Microsoft at this link: MS Visual C++ 2013 dist

Best regards!