Reputation: 249
I have installed nodejs on my windows pc. And it was working fine. But when I tried to install jsdom using "npm install jsdom" I was prompoted by this error.
node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\....\node_modules\node-gyp\bin\node-gyp.js" rebuild info it worked if it ends with ok
ERR! Error: Python does not seem to be installed
at failNoPython (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:78:14) at Object.oncomplete (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:66:11) ERR! not ok
npm WARN optional dependency failed, continuing [email protected]
[email protected] ./node_modules/jsdom
+-- [email protected] +-- [email protected]
Can anyone help me regarding this problem?
Upvotes: 12
Views: 15454
Reputation: 1669
After almost a half year of solving this issue, reading all forums related to this, I finally found the solution.
What I did was simple in my case because I don't use many apps on this computer.
My Windows 8.1 had many programs installed which confused the NodeJS probably (Frameworks, VS addons, etc.).
So I simply did this:
Then I reinstalled Node.js with optimism for JSdom which installed correctly, but crashed while running my project. So I searched for the new error which - again - has a simple solution. I had to install an older version of JSdom.
npm install [email protected]
Finally, everything works. Hope that helps anyone with this issue.
Upvotes: 0
Reputation: 118
jsdom
uses contextify
for running JavaScript on the DOM. And contextify
requires native C++ compiler. According to the official readme, on Windows platform, one has to install:
C:\Python27
.Upvotes: 1
Reputation: 2889
For windows 8 64-bit, installing zmq and protobuf, the following worked for me:
First, Install Visual Studio 2012
Then, on the command prompt (in your project directory):
SET VisualStudioVersion=11.0
npm install zmq
npm install protobuf
npm install jsdom
Upvotes: 1
Reputation: 1
If you have python installed already, you would need to add the python install directory to the PATH environment variable.
Assuming that python.exe is in the C:\Python32\
directory, on the DOS prompt you need to type:
set PATH=%PATH%;C:\Python32\;
and then:
node-gyp configure
should work fine without that error.
Upvotes: 0
Reputation: 198
I had the same issue on Windows 7 (x64 Ultimate), after hours of search and trials, here is how I resolved it. Please follow the steps in the same exact order:
I hope this helps.
Upvotes: 14
Reputation: 14062
There is a nice guide to getting JSDom working on Windows here: http://www.steveworkman.com/node-js/2012/installing-jsdom-on-windows/
Upvotes: 3
Reputation: 19117
jsdom has a dependency on contextify, which only recently supports windows. You'll need python and a C++ compiler to install it.
You may also need to do the following
npm install -g node-gyp
node-gyp configure
Upvotes: 1