Installing jsdom on nodejs, node-gyp ERROR: spawn ENOENT

2k views Asked by At

After three days trying to install jsdom on Windows Server 2008 R2 x64 i finally decided to post here as all the solutions given in the other similar posts did not work for me.

Here's what I've done so far on my x64 OS:

  • Installed Python (v2.7.8) and added it to the system path (C:\Python) and created a new variable PYTHON=C:\Python\python.exe which is definitely where the python executable is.
  • Installed MS VS C++ 2010 Express Version.
  • Installed Windows SDK 7.1.

my software versions are:

  • node.js: v0.10.33
  • npm: v1.4.28
  • node-gyp: v1.0.1

When i try to install jsdom ("npm insall jsdom" on project folder) i get the following error:

I can read in every similar post that it is python environment variable issue but i already registered them:

I also tried installing node.js v0.8.25 with same result, so i went back to v0.10.33.

I also tried setting "npm config set python C:\Python\" before launching npm install.

I don't know what else to try..

1

There are 1 answers

0
Max On BEST ANSWER

follow my README file to install D3 (it depends on Jsdom). Cheers

INSTALLING D3 NPM PACKAGE IN NODEJS ON WINDOWS 7x64

D3 pkg cannot be installed properly on Windows OS without a right setup. D3 depends on JSDOM, which has a dependency on CONTEXTIFY (Python and C++).

The following steps applied on Windows 7x64 Ultimate:

INSTALL

SETUP (set environment variable windows)

  • Add a custom folder ..\%USERNAME% to PATH (ex. C:\Users\Max)
  • Add python folder to PATH (ex. C:\Python27)
  • Add a new System Variable with name WindowsSDKDir and key the WinSDK bin folder (ex. C:\Program Files\Microsoft SDKs\Windows\v7.1\Bin)

RUN

  • Run Windows SDK 7.1 Command Prompt as Administrator
  • Set environment to x86 using [setenv /x86]
  • Change directory to the custom folder (ex. C:\Users\Max)

Finally, install d3 with [npm install d3].