arunoda / node-usage

process usage lookup with nodejs
MIT License
389 stars 93 forks source link

Usage module will not install on Windows 7 64-bit #23

Closed ghost closed 10 years ago

ghost commented 10 years ago

Node: v0.10.26 npm: v1.4.3 node-gyp: v0.13.0 Python: v2.7 All node-gyp Windows requirements (C++ compilers, Windows SDK)

Cannot install the usage module. I know there's no support for Windows - does anyone know of a workaround, at least?

usage@0.3.9 install C:\Users\ndgibson\node_modules\usage node-gyp rebuild C:\Users\ndgibson\node_modules\usage>node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin....\node_modules\node-gyp\bin\node-gyp.js" rebuild

Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.

binding.cpp C:\Users\ndgibson.node-gyp\0.10.26\deps\v8\include\v8.h(179): warning C4506: no definition for inline function 'v8::Persistent v8::Persistent::New(v8: :Handle)' [C:\Users\ndgibson\node_modules\usage\build\sysinfo.vcxproj] with [ T=v8::Object ] LINK : fatal error LNK1181: cannot open input file 'kernel32.lib' [C:\Users\IBM _ADMIN\node_modules\usage\build\sysinfo.vcxproj] gyp ERR! build error gyp ERR! stack Error: C:\windows\Microsoft.NET\Framework\v4.0.30319\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:267:23) gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:98:17) gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:797: 12) gyp ERR! System Windows_NT 6.1.7601 gyp ERR! command "node" "C:\Program Files\nodejs\node_modules\npm\node_modu les\node-gyp\bin\node-gyp.js" "rebuild" gyp ERR! cwd C:\Users\ndgibson\node_modules\usage gyp ERR! node -v v0.10.26 gyp ERR! node-gyp -v v0.12.2 gyp ERR! not ok npm ERR! usage@0.3.9 install: node-gyp rebuild npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the usage@0.3.9 install script. npm ERR! This is most likely a problem with the usage 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 usage 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\nod ejs\node_modules\npm\bin\npm-cli.js" "install" "usage" npm ERR! cwd C:\Users\ndgibson npm ERR! node -v v0.10.26 npm ERR! npm -v 1.4.3 npm ERR! code ELIFECYCLE npm ERR! npm ERR! Additional logging details can be found in: npm ERR! C:\Users\ndgibson\npm-debug.log npm ERR! not ok code 0

ghost commented 10 years ago

Running npm with the "msvs_version" flag set to "2012" fixed the issue.