Reputation: 15235
I had nodejs and karma installed on a 32-bit windows seven box, and it was working fine.
I'm now setting up a 64-bit windows seven box. I ran "npm install -g" in the directory with my "package.json" file.
It installed a lot of packages, but it seemed to get stuck at some point. Here's the end of the output:
npm http 304 https://registry.npmjs.org/commander
> [email protected] install C:\Users\=myuid=\AppData\Roaming\npm\node_modules\=myuid=\node_modules\karma\node_modules\socket.io\node_modules\socket.io-client\node_modules\ws
> (node-gyp rebuild 2> builderror.log) || (exit 0)
C:\Users\=myuid=\AppData\Roaming\npm\node_modules\=myuid=\node_modules\karma\node_modules\socket.io\node_modules\socket.io-client\node_modules\ws>node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild
It is hung here.
Here is my "package.json":
{
"name": "=myuid=",
"version": "0.0.0",
"description": "ERROR: No README.md file found!",
"main": "karma.conf.js",
"dependencies": {
"karma-firefox-launcher": "~0.1.0",
"karma-coffee-preprocessor": "~0.1.0",
"karma-phantomjs-launcher": "~0.1.0",
"karma-jasmine": "~0.1.3",
"karma": "~0.10.2",
"karma-coverage": "~0.1.0",
"karma-html2js-preprocessor": "~0.1.0",
"karma-script-launcher": "~0.1.0",
"karma-requirejs": "~0.1.0",
"karma-chrome-launcher": "~0.1.0"
},
"devDependencies": {},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": "",
"author": "",
"license": "BSD"
}
What could be the problem here? Anything else I should show here?
Update:
I realized a couple of things that I should have done differently, but I'm still stuck, although with a slightly different problem.
I forgot that running "npm install -g" requires running the shell as administrator, and it's probably not a good idea to run this in a Cygwin bash shell on Windows. I reran "npm install -g karma --force" in a "cmd" run by administrator. This completes without apparent error, but at the end it does not install the "karma.cmd" script in :%HOME%\AppData\Roaming\npm".
Upvotes: 0
Views: 1156
Reputation: 22728
Make sure you have all the required software to run node-gyp
:
You can configure version of Visual Studio used by gyp
via an environment variable so you can avoid having to set the --msvs_version=2012
property.
Examples:
GYP_MSVS_VERSION=2012
for Visual Studio 2012 GYP_MSVS_VERSION=2013e
(the 'e' stands for 'express edition') For the full list see - https://github.com/joyent/node/blob/v0.10.29/tools/gyp/pylib/gyp/MSVSVersion.py#L209-294
This is still painful for Windows users of NodeJS as it assumes you have a copy of Visual Studio installed and many end users will never have this. So I'm lobbying Joyent to the encourage them to include web sockets as part of CORE node and also to possible ship a GNU gcc compiler as part of NodeJS install so we can permanently fix this problem.
Feel free to add your vote at:
Upvotes: 2