node-gyp: Problems using node-gyp

I am currently working on a Win7-64 (Ultimate) machine with the Microsoft Windows SDK for Windows 7 installed. I consistently have difficulty installing nodejs modules that interest me. Node-gyp seems to be the one package that is involved. All superficial indicators seem to say that nodejs, npm, and node-gyp are installed correctly.

The most obvious odd thing I see is the line:

LINK : fatal error LNK1181: cannot open input file ‘C:\Users\wittend.node-gyp\0.10.1\node.lib’

By default, there is no copy of node.lib in 'C:\Users\wittend.node-gyp\0.10.1'. There are copies in three folders beneath this, in ia32, x64, and Release. I gather there may be a missing environment variable that determines the correct subfolder to look in.

But Windows, when faced with a path with two consecutive backslashes, sometimes reads them as a single backslash. So windows looks for node.lib in C:\Users\wittend.node-gyp\0.10.1\node.lib. This happened for me with node-gyp 1.10.0, so I moved a copy of node.lib from the \Release folder up a level in that tree. But the problem came back when node-gyp got updated. I am not at all certain that is the correct version of the library to use. And if there is an unset environment variable, what is it?

A full typical example of the output I get is this:

C:\Users\wittend\AppData\Roaming\npm\node_modules\ftdi>node “C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin.…\node_m odules\node-gyp\bin\node-gyp.js” rebuild C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\xlocale(342): warning C4530: C++ exception handler used, but unwind s emantics are not enabled. Specify /EHsc C:\Users\wittend.node-gyp\0.10.1\deps\v8\include\v8.h(184): warning C4506: no definition for inline function ‘v8::Persistent<T> v8 ::Persistent<T>::New(v8::Handle<T>)’ C:\Users\wittend.node-gyp\0.10.1\deps\v8\include\v8.h(184): warning C4506: no definition for inline function ‘v8::Persistent<T> v8 ::Persistent<T>::New(v8::Handle<T>)’ C:\Users\wittend.node-gyp\0.10.1\deps\v8\include\v8.h(179): warning C4506: no definition for inline function ‘v8::Persistent<T> v8 ::Persistent<T>::New(v8::Handle<T>)’ LINK : fatal error LNK1181: cannot open input file ‘C:\Users\wittend.node-gyp\0.10.1\node.lib’ Project : warning PRJ0018: The following environment variables were not found: gyp ERR! build error gyp ERR! stack Error: C:\Windows\Microsoft.NET\Framework64\v3.5\msbuild.exe failed with exit code: 1 gyp ERR! stack at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:256:23) gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:98:17) gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:754:12) gyp ERR! System Windows_NT 6.1.7601 gyp ERR! command “node” "C:\Program

Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" “rebuild” gyp ERR! cwd C:\Users\wittend\AppData\Roaming\npm\node_modules\ftdi gyp ERR! node -v v0.10.1 gyp ERR! node-gyp -v v0.8.5 gyp ERR! not ok npm ERR! ftdi@1.0.0 preinstall: node-gyp rebuild npm ERR! cmd "/c" "node-gyp rebuild" failed with 1 npm ERR! npm ERR! Failed at the ftdi@1.0.0 preinstall script. npm ERR! This is most likely a problem with the ftdi package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! node-gyp rebuild npm ERR! You can get their info via: npm ERR! npm owner ls ftdi 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\nodejs\node_modules\npm\bin\npm-cli.js” “-g” “insta ll” “ftdi” npm ERR! cwd D:\Projects\code\web-csg npm ERR! node -v v0.10.1 npm ERR! npm -v 1.2.15 npm ERR! code ELIFECYCLE npm ERR! npm ERR! Additional logging details can be found in: npm ERR! D:\Projects\code\web-csg\npm-debug.log npm ERR! not ok code 0 D:\Projects\code\web-csg>

Thanks,

Dave

About this issue

  • Original URL
  • State: closed
  • Created 11 years ago
  • Comments: 26 (11 by maintainers)

Commits related to this issue

Most upvoted comments

Yes, I had spent a lot of time with google before I posted this. My primary intent was to let you know that your posted links were useless. And MS seems to have no intention of fixing this. The suggested workarounds do not work for my situation, so using any package dependent on node-gyp is dead on the pavement. The glory of the source-only distribution model!

-Dave

On Wed, May 8, 2013 at 2:48 PM, Nathan Rajlich notifications@github.comwrote:

@wittend https://github.com/wittend Your particular error it looks like is a problem on Microsoft’s end: http://connect.microsoft.com/VisualStudio/feedback/details/660584/ (p.s. google is your friend…)

— Reply to this email directly or view it on GitHubhttps://github.com/TooTallNate/node-gyp/issues/227#issuecomment-17629415 .