Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to install on Windows [Node 0.12] #559

Open
simonvizzini opened this issue Feb 12, 2015 · 14 comments
Open

Unable to install on Windows [Node 0.12] #559

simonvizzini opened this issue Feb 12, 2015 · 14 comments

Comments

@simonvizzini
Copy link

Hello,

I'm trying to install node-inspector since an hour on my Win 8.1 x64 machine, but I'm getting all sorts of errors when doing npm install node-inspector. Every time I fix an error, a new one appears. I didn't see any special steps for Windows installations, like external dependencies in the documentation so I thought it should be pretty much a single npm command.

I should mention that I'm new to the node and npm world, so it's possible that I'm doing something completely wrong

I'm currently using node version 0.11.9 and I'll try to explain every issue I had so far trying to install node-inspector, because I think it's not just a node-inspector problem and I think you guys could clarify the one or other thing. (I was able to fix most issues on my own but now I'm stuck).

First issue:
Installation failed because the dependent semver package could not be installed because the make command could not be found. Huh? Ok I tried npm install semver to see if that works but it still complained about missing make. I then installed make for Windows, added it to my PATH variable and tried again. But still no luck, this time make was giving me some cryptical error output. At this point I remembered that I had troubles installing gulp at work a couple of days ago, and the solution to that problem kinda baffled me. It also solved my issue here! The thing is that node 0.11.9 ships with npm 1.3.14, but the current version of npm is 2.5.1! Even the 1.x version is at 1.4.26, so why is such an old version shipped with node? Once I updated npm to 2.5.1 I was able to install gulp, as well as semver without issues. This totally makes no sense.

Second issue:
Now that semver was installing fine, I tried to install node-inspector again. But this time node-gyp was complaining: Command 'python' not found... Well ok then, I installed latest Python 3.x, tried again, and this time I got: Error: Python 3.x is not supported... you got to be kidding me. I checked the node-gyp homepage and there is written that I need some old 2.x version. And when running on Windows Visual Studio 2012/2013 is additionally required to run node-gyp. Luckily I already have VS 2013 installed, otherwise I'd probably have given up by now. Maybe it should be mentioned somewhere that python 2.x and VS 2012/2013 is required in order to install node-inspector on Windows.

Third issue:
Okay so I installed python 2.x and tried once again. This time no more python errors, but instead a wall of red text, which seem to be C++ compiler errors. That's where I'm stuck now because I have no clue what to do.

I redirected console output to a file and it's 300kb of text, the npm-debug.log is 845kb, but I guess the last few lines are the most important ones so I will post them here. Let me know if the debug.log is required and I will upload it somewhere.

gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\MSBuild\12.0\bin\msbuild.exe` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onExit (k:\Temp\node_modules\node-gyp\lib\build.js:267:23)
gyp ERR! stack     at ChildProcess.EventEmitter.emit (events.js:101:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:827:12)
gyp ERR! System Windows_NT 6.2.9200
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "k:\\Temp\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "configure" "--fallback-to-build" "--modul
e=k:\\Temp\\node_modules\\node-inspector\\node_modules\\v8-profiler\\build\\profiler\\v5.2.3\\node-v0.11.9-win32-x64\\profiler.node" "--module_name=profiler" "-
-module_path=K:\\Temp\\node_modules\\node-inspector\\node_modules\\v8-profiler\\build\\profiler\\v5.2.3\\node-v0.11.9-win32-x64" "--module=k:\\Temp\\node_module
s\\node-inspector\\node_modules\\v8-profiler\\build\\profiler\\v5.2.3\\node-v0.11.9-win32-x64\\profiler.node" "--module_name=profiler" "--module_path=K:\\Temp\\
node_modules\\node-inspector\\node_modules\\v8-profiler\\build\\profiler\\v5.2.3\\node-v0.11.9-win32-x64"
gyp ERR! cwd K:\Temp\node_modules\node-inspector\node_modules\v8-profiler
gyp ERR! node -v v0.11.9
gyp ERR! node-gyp -v v1.0.2
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute 'C:\Program Files\nodejs\node.exe k:\Temp\node_modules\node-gyp\bin\node-gyp.js rebuild configure --fallback-to
-build --module=k:\Temp\node_modules\node-inspector\node_modules\v8-profiler\build\profiler\v5.2.3\node-v0.11.9-win32-x64\profiler.node --module_name=profiler -
-module_path=K:\Temp\node_modules\node-inspector\node_modules\v8-profiler\build\profiler\v5.2.3\node-v0.11.9-win32-x64 --module=k:\Temp\node_modules\node-inspec
tor\node_modules\v8-profiler\build\profiler\v5.2.3\node-v0.11.9-win32-x64\profiler.node --module_name=profiler --module_path=K:\Temp\node_modules\node-inspector
\node_modules\v8-profiler\build\profiler\v5.2.3\node-v0.11.9-win32-x64' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (k:\Temp\node_modules\node-pre-gyp\lib\util\compile.js:71:29)
node-pre-gyp ERR! stack     at ChildProcess.EventEmitter.emit (events.js:101:17)
node-pre-gyp ERR! stack     at maybeClose (child_process.js:773:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:840:5)
node-pre-gyp ERR! System Windows_NT 6.2.9200
node-pre-gyp ERR! command "node" "k:\\Temp\\node_modules\\node-pre-gyp\\bin\\node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd K:\Temp\node_modules\node-inspector\node_modules\v8-profiler
node-pre-gyp ERR! node -v v0.11.9
node-pre-gyp ERR! node-pre-gyp -v v0.6.3
node-pre-gyp ERR! not ok
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\MSBuild\12.0\bin\msbuild.exe` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onExit (k:\Temp\node_modules\node-gyp\lib\build.js:267:23)
gyp ERR! stack     at ChildProcess.EventEmitter.emit (events.js:101:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:827:12)
gyp ERR! System Windows_NT 6.2.9200
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "k:\\Temp\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "--name=v8-debug" "--configuration=Release
" "--module_name=debug" "--version=0.3.5" "--minor=3" "--patch=5" "--runtime=node" "--node_abi=node-v13" "--platform=win32" "--target_platform=win32" "--arch=x6
4" "--target_arch=x64" "--module_main=v8-debug" "--host=https://node-inspector.s3.amazonaws.com/" "--module_path=K:\\Temp\\node_modules\\node-inspector\\node_mo
dules\\v8-debug\\build\\debug\\v0.3.5\\node-v13-win32-x64" "--module=k:\\Temp\\node_modules\\node-inspector\\node_modules\\v8-debug\\build\\debug\\v0.3.5\\node-
v13-win32-x64\\debug.node" "--remote_path=./debug/v0.3.5/" "--package_name=node-v13-win32-x64.tar.gz" "--staged_tarball=build\\stage\\debug\\v0.3.5\\node-v13-wi
n32-x64.tar.gz" "--hosted_path=https://node-inspector.s3.amazonaws.com/debug/v0.3.5/" "--hosted_tarball=https://node-inspector.s3.amazonaws.com/debug/v0.3.5/nod
e-v13-win32-x64.tar.gz"
gyp ERR! cwd K:\Temp\node_modules\node-inspector\node_modules\v8-debug
gyp ERR! node -v v0.11.9
gyp ERR! node-gyp -v v1.0.2
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute 'C:\Program Files\nodejs\node.exe k:\Temp\node_modules\node-gyp\bin\node-gyp.js rebuild --name=v8-debug --confi
guration=Release --module_name=debug --version=0.3.5 --minor=3 --patch=5 --runtime=node --node_abi=node-v13 --platform=win32 --target_platform=win32 --arch=x64
--target_arch=x64 --module_main=v8-debug --host=https://node-inspector.s3.amazonaws.com/ --module_path=K:\Temp\node_modules\node-inspector\node_modules\v8-debug
\build\debug\v0.3.5\node-v13-win32-x64 --module=k:\Temp\node_modules\node-inspector\node_modules\v8-debug\build\debug\v0.3.5\node-v13-win32-x64\debug.node --rem
ote_path=./debug/v0.3.5/ --package_name=node-v13-win32-x64.tar.gz --staged_tarball=build\stage\debug\v0.3.5\node-v13-win32-x64.tar.gz --hosted_path=https://node
-inspector.s3.amazonaws.com/debug/v0.3.5/ --hosted_tarball=https://node-inspector.s3.amazonaws.com/debug/v0.3.5/node-v13-win32-x64.tar.gz' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (k:\Temp\node_modules\node-inspector\node_modules\v8-debug\node_modules\node-pre-gyp\lib\util\compile.js
:76:29)
node-pre-gyp ERR! stack     at ChildProcess.EventEmitter.emit (events.js:101:17)
node-pre-gyp ERR! stack     at maybeClose (child_process.js:773:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:840:5)
node-pre-gyp ERR! System Windows_NT 6.2.9200
node-pre-gyp ERR! command "node" "k:\\Temp\\node_modules\\node-inspector\\node_modules\\v8-debug\\node_modules\\node-pre-gyp\\bin\\node-pre-gyp" "install" "--fa
llback-to-build"
node-pre-gyp ERR! cwd K:\Temp\node_modules\node-inspector\node_modules\v8-debug
node-pre-gyp ERR! node -v v0.11.9
node-pre-gyp ERR! node-pre-gyp -v v0.5.31
node-pre-gyp ERR! not ok
npm ERR! Windows_NT 6.2.9200
npm ERR! argv "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "node-inspector"
npm ERR! node v0.11.9
npm ERR! npm  v2.5.1
npm ERR! code ELIFECYCLE

npm ERR! v8-profiler@5.2.3 install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the v8-profiler@5.2.3 install script 'node-pre-gyp install --fallback-to-build'.
npm ERR! This is most likely a problem with the v8-profiler 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-profiler
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     K:\Temp\npm-debug.log

K:\Temp>node --version
v0.11.9

K:\Temp>

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

@Charlesjwilliams2
Copy link

I have problems to simon's above. I was using node 10.33 and node-inspector 0.83 and decided (as is often the case) to update to the latest and (greatest?).

@borm
Copy link

borm commented Feb 17, 2015

install python 2.7.9
https://www.python.org/downloads/release/python-279/

@lyenliang
Copy link

I changed my node version back to 0.10.36, then node-inspector can be installed correctly. Maybe we can focus on the changes made between node 0.11.9 and node 0.10.36

@3y3
Copy link
Member

3y3 commented Feb 17, 2015

Why 0.11.9? This is unstable version. We can't support all unstable subversions. From 0.11.9 to 0.11.13 debugging API was changed dramatically.
In current time we support unstable 0.11.13 (maybe 0.11.14) version.
0.11.15-16 reimplements big part of debugger, now I work on supporting this changes.

@cookch10
Copy link

I just updated from node v0.10.36 to v0.12.0 on Windows 7 x64 and was unable to install node-inspector (v0.8.3) via npm. I am using npm v2.5.1. I tried installing python-2.7.9 per the suggestion above and this solved the installation issue (python v3.4.2 did not solve the issue, you must install 2.7.9).

Although the installation appears to be successful, debugging doesn't appear to be functioning properly. When starting node-inspector, I see the following console message in Chrome browser:

Your Node version (undefined) has a partial support of profiler.
The stack frames tree doesn't show all stack frames due to low sampling rate.
The profiling data is incomplete and may show misleading results.
Update Node to 0.11.13 or newer to get full support.

The debugger then steps into node.js' function _tickCallback() {...} and debugging hangs.

@valtido
Copy link

valtido commented Feb 18, 2015

same problem here :(

@ghsamm
Copy link

ghsamm commented Mar 24, 2015

same problem described by @cookch10

@bajtos
Copy link
Member

bajtos commented Apr 24, 2015

Is the problem still present on the latest Node 0.12 version using the Node Inspector version from github master branch?

@bajtos bajtos changed the title Unable to install on Windows Unable to install on Windows [Node 0.12] Apr 24, 2015
@nevi-me
Copy link

nevi-me commented Jul 4, 2015

Updating to the latest version of iojs worked for me, the culprit was when building v8-profiler. I still got errors, but some optional dependencies fail to build.

@stefek99
Copy link

@simonvizzini I'm getting similar errors on my machine.

This time no more python errors, but instead a wall of red text, which seem to be C++ compiler errors.

C:\Users\a-miste\AppData\Roaming\npm\node_modules\node-inspector\node_modules\ws\node_modules\utf-8-validate>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (node  rebuild )
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(365,5): error MSB6006: "CL.exe" exited with code -1073741511. [C: \Users\a-miste\AppData\Roaming\npm\node_modules\node-inspector\node_modules\ws\node_modules\utf-8-validate\build\validation.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\MSBuild\14.0\bin\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:269:23)
gyp ERR! stack     at ChildProcess.emit (events.js:110:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:1074:12)
gyp ERR! System Windows_NT 6.3.9600
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\a-miste\AppData\Roaming\npm\node_modules\node-inspector\node_modules\ws\node_modules\utf-8-validate
gyp ERR! node -v v0.12.7
gyp ERR! node-gyp -v v2.0.1
gyp ERR! not ok
npm WARN engine xmlbuilder@2.2.1: wanted: {"node":"0.8.x || 0.10.x"} (current: {"node":"0.12.7","npm":"2.11.3"})

> bufferutil@1.1.0 install C:\Users\a-miste\AppData\Roaming\npm\node_modules\node-inspector\node_modules\ws\node_modules\bufferutil
> node-gyp rebuild


C:\Users\a-miste\AppData\Roaming\npm\node_modules\node-inspector\node_modules\ws\node_modules\bufferutil>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (node  rebuild )
Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(365,5): error MSB6006: "CL.exe" exited with code -1073741511. [C: \Users\a-miste\AppData\Roaming\npm\node_modules\node-inspector\node_modules\ws\node_modules\bufferutil\build\bufferutil.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: `C:\Program Files (x86)\MSBuild\14.0\bin\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:269:23)
gyp ERR! stack     at ChildProcess.emit (events.js:110:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:1074:12)
gyp ERR! System Windows_NT 6.3.9600
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\a-miste\AppData\Roaming\npm\node_modules\node-inspector\node_modules\ws\node_modules\bufferutil
gyp ERR! node -v v0.12.7
gyp ERR! node-gyp -v v2.0.1
gyp ERR! not ok
npm WARN optional dep failed, continuing utf-8-validate@1.1.0
npm WARN optional dep failed, continuing bufferutil@1.1.0

Regardless the errors node-inspector seems to be working fine.


node --version
v0.12.7

python 2.7.10

windows 8.1 enterprise

@simonvizzini
Copy link
Author

For me node-inspector with node 0.12.7 seems to work fine now on Windows, I also still got some errors while installing, but apparently nothing critical (didn't pay too much attention and haven't saved any logs), So far node-inspector seems to work fine! Really awesome tool :) I don't have the other problems mentioned in the issue. Not sure if this issue can be closed, or if others are still unable to install on Windows?

@jamietre
Copy link

.. so... ignore the original version of this comment completely. The solution to installing this on windows -- at least for me -- is the same as many packages that have trouble with windows:

npm install -g node-inspector --no-optional

Apparently one of the optional dependencies kills the install script, ignoring them works swimmingly.

@dandv
Copy link

dandv commented Sep 20, 2015

@jamietre: passing --no-optional alone didn't work. I had also installed Python 2.7.10.

The error included this:

Building the projects in this solution one at a time. To enable parallel build, please add the "/m" switch.
MSBUILD : error MSB3428: Could not load the Visual C++ component "VCBuild.exe". To fix this, 1) install the .NET Framework 2.0 SD K, 2) install Microsoft Visual Studio 2005 or 3) add the location of the component to the system path if it is installed elsewher e. [C:\Users\A\AppData\Roaming\npm\node_modules\node-inspector\node_modules\ws\node_modules\bufferutil\build\binding.sln]

and

npm ERR! Failed at the v8-profiler@5.3.1 install script 'node-pre-gyp install --fallback-to-build'.

Hey @node-inspector, what are the actual prerequisites for Windows? That should be listed in the README.

@maityarkodeb
Copy link

@dandv I was getting the same error. Installing VS should fix that one. In addition I had to install node-gyp, python and a C++ compiler (I didn't have one.) Following post from a fellow user described the steps to install all the necessary requisites. Hope it helps.

Please see the node-gyp installation. Some other helpful resources include this comment and this comment. Also, if you install VS, you may not have a C++ compiler, in which case you may get an error about "CL.exe" not being found. To fix that, open VS, create a "New Project", choose something under the Visual C++ category, and then you'll see options to install a C++ compiler (which you should go with). After all of that, you might as well just do a full reboot, and then it should all work like a charm.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

15 participants