Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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:// (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 May 25 '13 at 9:13

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

The particular article you reference is two years old! Have you tried installing a binary from here? Have you tried installing Node with lubuntu's package manager? – Myrne Stol May 24 '13 at 22:14
You could also try nvm: – Myrne Stol May 24 '13 at 22:20
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… and now it works. thanks! – user1873073 May 25 '13 at 0:58

Your Answer


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.