1

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.

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

1 Answers1

1

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.

Mustafa
  • 225
  • i thought it would just work. windows has spoiled me. i uninstalled and followed these instructions http://slopjong.de/2012/10/31/how-to-install-the-latest-nodejs-in-ubuntu/ and now it works. thanks! – user1873073 May 25 '13 at 00:58