-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Installing jsdom via npm on windows fails on contextify #378
Comments
For installing Contextify on Windows, see:
I'll add some documentation on installation issues/windows to the Contextify README sometime in the next few days. |
Same issue here.
|
Windows doesn't support native modules right now, and contextify is a native module. The only way around it would be to not use contextify somehow or change contextify to work without a native module. Or wait for native module support in windows. Ideally jsdom could be changed to use the built in 'vm' module instead of contextify: http://nodejs.org/docs/v0.6.3/api/vm.html However, it may be that jsdom cannot operate as it does now using the 'vm' module so switching to the 'vm' module might require removing some features from jsdom that existing code relies on. |
I'm seeing this on Macos as well. |
On Mac OS X you need to first install Xcode, or something else that provides gcc. |
Same issue. "This is a jsdom bug. It should list contextify as an optionalDependency, or not use it at all. node-waf will never work on windows." Is it possible that contextify can be optional here? |
See: #398 . You should also be able to build Contextify on Windows using node-gyp and the latest Contextify master (https://github.com/brianmcd/contextify). |
I'm seeing this on MacOS with the latest version of XCode (4.3.1) installed as well. |
Are you running the latest node? If not, try installing 0.6.12. There were some issues with 0.6.11 being distributed as a 32-bit binary, but the workarounds to fix that broke the install for some other people. 0.6.12 is a fat binary, and things should just work now with 0.6.12. |
Yup... Node 0.6.12: 'configure' finished successfully (0.078s)
Waf: Entering directory `/home/brianmcd/projects/test-install/node_modules/contextify/build'
Waf: Leaving directory `/home/brianmcd/projects/test-install/node_modules/contextify/build'
Traceback (most recent call last):
File "/usr/local/bin/node-waf", line 16, in <module>
Scripting.prepare(t, os.getcwd(), VERSION, wafdir)
File "/usr/local/bin/../lib/node/wafadmin/Scripting.py", line 145, in prepare
prepare_impl(t, cwd, ver, wafdir)
File "/usr/local/bin/../lib/node/wafadmin/Scripting.py", line 135, in prepare_impl
main()
File "/usr/local/bin/../lib/node/wafadmin/Scripting.py", line 188, in main
fun(ctx)
File "/usr/local/bin/../lib/node/wafadmin/Scripting.py", line 386, in build
return build_impl(bld)
File "/usr/local/bin/../lib/node/wafadmin/Scripting.py", line 405, in build_impl
bld.compile()
File "/usr/local/bin/../lib/node/wafadmin/Build.py", line 268, in compile
os.chdir(self.bldnode.abspath())
OSError: [Errno 2] No such file or directory: '/home/brianmcd/projects/test-install/node_modules/contextify/build'
npm ERR! error installing contextify@0.1.2
npm ERR! error installing jsdom@0.2.13
npm ERR! contextify@0.1.2 preinstall: `node-waf clean || (exit 0); node-waf configure build`
npm ERR! `sh "-c" "node-waf clean || (exit 0); node-waf configure build"` failed with 1
npm ERR!
npm ERR! Failed at the contextify@0.1.2 preinstall script. [...] |
Ok, thanks. Working on this now. |
I think this should be fixed now. Somehow my build/ folder got into the npm package, even though my .npmignore file has build/ in it. Thanks for the heads up. Edit: you might need to do an |
Thank you for the quick patch! Looks good. |
D:\node.js>npm install jsdom
npm http GET https://registry.npmjs.org/jsdom
npm http 304 https://registry.npmjs.org/jsdom
npm http GET https://registry.npmjs.org/cssom
npm http GET https://registry.npmjs.org/contextify
npm http GET https://registry.npmjs.org/htmlparser
npm http GET https://registry.npmjs.org/request
npm http 304 https://registry.npmjs.org/cssom
npm http 304 https://registry.npmjs.org/contextify
npm http 304 https://registry.npmjs.org/htmlparser
npm http 304 https://registry.npmjs.org/request
npm WARN htmlparser@1.7.3 package.json: bugs['web'] should probably be bugs['url
']
node-waf was unexpected at this time.
npm ERR! error installing contextify@0.0.7
npm ERR! error installing jsdom@0.2.10
npm ERR! Error: ENOENT, no such file or directory 'D:\node.js\node_modules\jsdom
\node_modules___cssom.npm\package\comments.js'
npm ERR! Report this entire log at:
npm ERR! http://github.com/isaacs/npm/issues
npm ERR! or email it to:
npm ERR! npm-@googlegroups.com
npm ERR!
npm ERR! System Windows_NT 6.1.7600
npm ERR! command "C:\Program Files\nodejs\node.exe" "C:\Program Files\nod
ejs\node_modules\npm\bin\npm-cli.js" "install" "jsdom"
npm ERR! cwd D:\node.js
npm ERR! node -v v0.6.6
npm ERR! npm -v 1.1.0-beta-4
npm ERR! path D:\node.js\node_modules\jsdom\node_modules___cssom.npm\package\co
mments.js
npm ERR! fstream_path D:\node.js\node_modules\jsdom\node_modules___cssom.npm\pa
ckage\comments.js
npm ERR! fstream_type File
npm ERR! fstream_class FileWriter
npm ERR! code ENOENT
npm ERR! message ENOENT, no such file or directory 'D:\node.js\node_modules\jsdo
m\node_modules___cssom.npm\package\comments.js'
npm ERR! fstream_stack Object.oncomplete (C:\Program Files\nodejs\node_modules\n
pm\node_modules\fstream\lib\writer.js:204:26)
npm ERR! Error: ENOENT, no such file or directory 'D:\node.js\node_modules\jsdom
\node_modules___request.npm\package\tests\test-body.js'
npm ERR! Report this entire log at:
npm ERR! http://github.com/isaacs/npm/issues
npm ERR! or email it to:
npm ERR! npm-@googlegroups.com
npm ERR!
npm ERR! System Windows_NT 6.1.7600
npm ERR! command "C:\Program Files\nodejs\node.exe" "C:\Program Files\nod
ejs\node_modules\npm\bin\npm-cli.js" "install" "jsdom"
npm ERR! cwd D:\node.js
npm ERR! node -v v0.6.6
npm ERR! npm -v 1.1.0-beta-4
npm ERR! path D:\node.js\node_modules\jsdom\node_modules___request.npm\package
tests\test-body.js
npm ERR! fstream_path D:\node.js\node_modules\jsdom\node_modules___request.npm
package\tests\test-body.js
npm ERR! fstream_type File
npm ERR! fstream_class FileWriter
npm ERR! fstream_finish_call chmod
npm ERR! code ENOENT
npm ERR! message ENOENT, no such file or directory 'D:\node.js\node_modules\jsdo
m\node_modules___request.npm\package\tests\test-body.js'
npm ERR! fstream_stack Object.oncomplete (C:\Program Files\nodejs\node_modules\n
pm\node_modules\fstream\lib\writer.js:285:17)
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! D:\node.js\npm-debug.log
npm not ok
The text was updated successfully, but these errors were encountered: