Installation or require problem

518 views
Skip to first unread message

Robin

unread,
Feb 26, 2013, 10:01:15 PM2/26/13
to js...@googlegroups.com
Hi,

I am getting and odd error when I try to install jsdom, see below...
$ npm install jsdom
npm WARN install Refusing to install jsdom as a dependency of itself

Can anyone tell me if/what I'm doing wrong?

I took that to mean everything was peachy and tried the following basic code...
var jsdom = require('jsdom').jsdom;

...but it just failed with the following error...
module.js:340
    throw err;
          ^
Error: Cannot find module 'request'
    at Function.Module._resolveFilename (module.js:338:15)
    at Function.Module._load (module.js:280:25)
    at Module.require (module.js:362:17)
    at require (module.js:378:17)
    at Object.<anonymous> (/home/robin/Downloads/jsdom/lib/jsdom.js:5:16)
    at Module._compile (module.js:449:26)
    at Object.Module._extensions..js (module.js:467:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:362:17)

Anyone know what I'm doing wrong?

Thanks in advance for your help!

Robin

Domenic Denicola

unread,
Mar 2, 2013, 12:27:01 AM3/2/13
to js...@googlegroups.com

What version of npm/Node are you running?

 

--
You received this message because you are subscribed to the Google Groups "jsdom" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jsdom+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Robin

unread,
Mar 6, 2013, 6:09:32 PM3/6/13
to js...@googlegroups.com
I  have actually resolved this issue now thanks.

For anyone else that might get stuck: my problem was misunderstanding the installation instructions. I got the jsdom code using git then from the jsdom directory tried doing the npm install, which is why I got the problem. What I should have done is not bother with the git step and as the only installation step run "npm install jsdom"
Reply all
Reply to author
Forward
0 new messages