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

Don't install jsdom 3.x - it requires Python & Visual Studio on Windows #2519

Closed
anthomaxcool opened this issue Aug 1, 2015 · 5 comments
Closed
Assignees
Labels
Milestone

Comments

@anthomaxcool
Copy link

@anthomaxcool anthomaxcool commented Aug 1, 2015

Hi, I'm having some problems like the title says it.

In the terminal, it says:

Can't find Python executable ...
....
Tell the author that this fails on your system:
node-gyp rebuild
....
Tell the author that this fails on your system:
npm install && grunt

It also says that I need to include the file "npm-debug.log" with my support request... but I can't find it, this file doesn't exist.

So if needed, I copy pasted everything that was written in my terminal here ->

Running "jsdom" task

contextify@0.1.14 install c:\Users\Anthony\website\jquery\node_modules\jsdom\n
ode_modules\contextify
node-gyp rebuild

c:\Users\Anthony\website\jquery\node_modules\jsdom\node_modules\contextify>if no
t defined npm_config_node_gyp (node "c:\Program Files\nodejs\node_modules\npm\bi
n\node-gyp-bin....\node_modules\node-gyp\bin\node-gyp.js" rebuild ) else (re
build)
gyp ERR! configure error
gyp ERR! stack Error: Can't find Python executable "python", you can set the PYT
HON env variable.
gyp ERR! stack at failNoPython (c:\Program Files\nodejs\node_modules\npm\nod
e_modules\node-gyp\lib\configure.js:103:14)
gyp ERR! stack at c:\Program Files\nodejs\node_modules\npm\node_modules\node
-gyp\lib\configure.js:64:11
gyp ERR! stack at FSReqWrap.oncomplete (evalmachine.:95:15)
gyp ERR! System Windows_NT 6.3.9600
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\Anthony\website\jquery\node_modules\jsdom\node_modules\con
textify
gyp ERR! node -v v0.12.4
gyp ERR! node-gyp -v v1.0.3
gyp ERR! not ok
npm ERR! Windows_NT 6.3.9600
npm ERR! argv "c:\Program Files\nodejs\node.exe" "c:\Program Files\nodejs
\node_modules\npm\bin\npm-cli.js" "install" "jsdom@3.1.2"
npm ERR! node v0.12.4
npm ERR! npm v2.10.1
npm ERR! code ELIFECYCLE

npm ERR! contextify@0.1.14 install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the contextify@0.1.14 install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the contextify 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 contextify
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! c:\Users\Anthony\website\jquery\npm-debug.log
Warning: Use --force to continue.

Aborted due to warnings.

npm ERR! Windows_NT 6.3.9600
npm ERR! argv "c:\Program Files\nodejs\node.exe" "c:\Program Files\nodejs
node_modules\npm\bin\npm-cli.js" "run" "build"
npm ERR! node v0.12.4
npm ERR! npm v2.10.1
npm ERR! code ELIFECYCLE
npm ERR! jquery@3.0.0-pre build: npm install && grunt
npm ERR! Exit status 3
npm ERR!
npm ERR! Failed at the jquery@3.0.0-pre build script 'npm install && grunt'.
npm ERR! This is most likely a problem with the jquery package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! npm install && grunt
npm ERR! You can get their info via:
npm ERR! npm owner ls jquery
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! c:\Users\Anthony\website\jquery\npm-debug.log

@mgol
Copy link
Member

@mgol mgol commented Aug 1, 2015

@anthomaxcool You need to have Visual Studio installed on Windows to be able to install compiled dependencies as this one.

Or you can install io.js instead of Node.js and it will not require Visual Studio.

@jquery/core A lot of people seem to have a problem with compiled deps on Windows and the only dep we have that requires compiling is jsdom. Since io.js is going to soon merge with Node.js (most likely Node.js 4.0.0 will be the first such release, in about 3 months), I'm starting to think we should skip jsdom-related tests in Node.js/io.js older than 1.0 and always install the latest one, i.e. to just put:

"jsdom": "5.6.1"

in package.json; installation will work in all Nodes, just using it will fail in old Node.js. Current jsdom doesn't support Node.js 0.10 or 0.12 anyway, maybe we shouldn't support versions not supported upstream.

I'll leave it open for consideration at next meeting.

@mgol mgol changed the title Fail to install at "jsdom task" jsdom 3.x on Windows requires Visual Studio which makes it harder for newcomers to compile jQuery Aug 1, 2015
@mgol mgol added the Build label Aug 1, 2015
@mgol mgol self-assigned this Aug 1, 2015
@anthomaxcool
Copy link
Author

@anthomaxcool anthomaxcool commented Aug 1, 2015

Thanks for fast reply mzgol, but I have visual studio installed... it's ultimate visual studio 2013.

@mgol
Copy link
Member

@mgol mgol commented Aug 1, 2015

From the error you posted it seems you don't have Python 2.7 installed. Also, looking at README at https://github.com/joyent/node it seems you might need Visual Studio 2012 instead of 2013 (I'm not 100% sure if that's true, though).

Unfortunately, that's the state of things of how compiled packages work on Windows currently. :( If installing Python won't help and if you can upgrade Node.js, it would be easier for you to just install io.js and use that instead.

@anthomaxcool
Copy link
Author

@anthomaxcool anthomaxcool commented Aug 1, 2015

Alright, thanks a lot for your time and help. I'll look foward for io.js.

@mgol mgol added this to the 3.0.0 milestone Aug 3, 2015
@mgol mgol removed the Needs review label Aug 3, 2015
@mgol mgol changed the title jsdom 3.x on Windows requires Visual Studio which makes it harder for newcomers to compile jQuery Don't install jsdom 3.x - it requires Python & Visual Studio on Windows Aug 3, 2015
mgol added a commit to mgol/jquery that referenced this issue Aug 3, 2015
jsdom 3 requires Python & Visual Studio on Windows which is a significant
barrier to contributors. Newer jsdom versions don't require pre-compiling
but work only on io.js. This commit installs the new jsdom everywhere (it
does install in old Node.js, it just won't work) and executes Node-related
tests only on newer Nodes or if a working jsdom version is installed. The
latter can be achieved by running the `old_jsdom` task.

Node.js is merging with io.js soon so this will become a smaller problem over
time.

One drawback is our Jenkins setup runs on Node 0.10 so it won't be running
Node tests anymore. We have Travis set up on io.js, though so all PRs
have those tests run. When the new LTS Node.js arrives (as it soon merges
with io.js) we should update our Jenkins infrastructure so that it runs on this
new version.

Fixes jquerygh-2519
mgol added a commit to mgol/jquery that referenced this issue Aug 3, 2015
jsdom 3 requires Python & Visual Studio on Windows which is a significant
barrier to contributors. Newer jsdom versions don't require pre-compiling
but work only on io.js. This commit installs the new jsdom everywhere (it
does install in old Node.js, it just won't work) and executes Node-related
tests only on newer Nodes or if a working jsdom version is installed. The
latter can be achieved by running the `old_jsdom` task.

Node.js is merging with io.js soon so this will become a smaller problem over
time.

One drawback is our Jenkins setup runs on Node 0.10 so it won't be running
Node tests anymore. We have Travis set up on io.js, though so all PRs
have those tests run. When the new LTS Node.js arrives (as it soon merges
with io.js) we should update our Jenkins infrastructure so that it runs on this
new version.

Fixes jquerygh-2519
Closes jquerygh-2526
@mgol
Copy link
Member

@mgol mgol commented Aug 3, 2015

PR: #2526.

mgol added a commit to mgol/jquery that referenced this issue Aug 6, 2015
jsdom 3 requires Python & Visual Studio on Windows which is a significant
barrier to contributors. Newer jsdom versions don't require pre-compiling
but work only on io.js. This commit installs the new jsdom everywhere (it
does install in old Node.js, it just won't work) and executes Node-related
tests only on newer Nodes or if a working jsdom version is installed. The
latter can be achieved by running the `old_jsdom` task.

Node.js is merging with io.js soon so this will become a smaller problem over
time.

One drawback is our Jenkins setup runs on Node 0.10 so it won't be running
Node tests anymore. We have Travis set up on io.js, though so all PRs
have those tests run. When the new LTS Node.js arrives (as it soon merges
with io.js) we should update our Jenkins infrastructure so that it runs on this
new version.

Fixes jquerygh-2519
Closes jquerygh-2526
@mgol mgol closed this in dbb2daa Sep 8, 2015
mgol added a commit that referenced this issue Sep 8, 2015
jsdom 3 requires Python & Visual Studio on Windows which is a significant
barrier to contributors. Newer jsdom versions don't require pre-compiling
but work only on io.js. This commit installs the new jsdom everywhere (it
does install in old Node.js, it just won't work) and executes Node-related
tests only on newer Nodes or if a working jsdom version is installed. The
latter can be achieved by running the `old_jsdom` task.

Node.js is merging with io.js soon so this will become a smaller problem over
time.

One drawback is our Jenkins setup runs on Node 0.10 so it won't be running
Node tests anymore. We have Travis set up on io.js, though so all PRs
have those tests run. When the new LTS Node.js arrives (as it soon merges
with io.js) we should update our Jenkins infrastructure so that it runs on this
new version.

(cherry-picked from dbb2daa)

Fixes gh-2519
Closes gh-2526
@dmethvin dmethvin added this to the 1.12/2.2 milestone Jan 8, 2016
@dmethvin dmethvin removed this from the 3.0.0 milestone Jan 8, 2016
@lock lock bot locked as resolved and limited conversation to collaborators Jun 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants