Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am trying to do a simple

sudo npm install jsdom

but I get the following error. I used these instructions for installing node. This was a clean install of lubuntu. The entire setup is listed in the following steps:

  1. install lubuntu and virtual box guest additions
  2. sudo apt-get install eclipse-cdt
  3. sudo apt-get install g++ curl libssl-dev apache2-utils
  4. sudo apt-get install git-core
  5. cd .. to the root directory
  6. sudo chmod 0777 / (I know this is completely insane. It's just a test virtual OS).
  7. git clone git://github.com/ry/node.git (this creates /node with files inside)
  8. cd node
  9. ./configure
  10. make
  11. sudo make install
  12. sudo npm install jsdom

I have used

sudo npm -f install --nodedir=/node jsdom   

but even then if I try to use the module in a script it crashes saying there is no implementation for the module.

share|improve this question

migrated from stackoverflow.com May 25 '13 at 9:13

This question came from our site for professional and enthusiast programmers.

1  
The particular article you reference is two years old! Have you tried installing a binary from here? nodejs.org/download Have you tried installing Node with lubuntu's package manager? –  Meryn Stol May 24 '13 at 22:14
1  
You could also try nvm: github.com/creationix/nvm –  Meryn Stol May 24 '13 at 22:20
add comment

1 Answer

up vote 1 down vote accepted

You are using a pre version of Node, which is kinda beta version, which may have compability issues. Also, your script says that you should supply --nodedir= but you supply it to /node which is not probably the right place.

Find out where is your node installation at by which node or which nodejs and point to that directory in your install command.

share|improve this answer
    
i thought it would just work. windows has spoiled me. i uninstalled and followed these instructions slopjong.de/2012/10/31/… and now it works. thanks! –  user1873073 May 25 '13 at 0:58
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.