0

Here's where I'm at...

I have an old chromebook that I put Ubuntu (and Xfce) on via crouton. After installing the chromium browser, I installed nodejs via apt-get. I found that when trying to install yeoman, my node version was too old (v0.6).

So, I removed nodejs and npm:

sudo apt-get remove npm
sudo apt-get remove nodejs
sudo apt-get autoremove

Then followed the instructions here: https://github.com/joyent/node/wiki/Installing-Node.js-via-package-manager#debian-and-ubuntu-based-linux-distributions:

curl -sL https://deb.nodesource.com/setup | sudo bash -
sudo apt-get install -y nodejs

After installing nodejs, I can run nodejs --version to see the node version is v0.10.36.

Then, when I run npm --version, I get no output at all.

1

you can install npm using this command:

sudo apt-get install npm
  • Thanks, but nodejs from nodesource includes npm already. There's no longer any reason to install npm separately. – csturtz Feb 23 '15 at 16:13
  • btw, for precise (12.04LTS) the npm version is 1.1.4. packages.ubuntu.com/precise/npm – 彭明伟 Feb 24 '15 at 0:21
1

After countless attempts with various approaches, this is what finally worked!

https://gist.github.com/csturtz/11f79e6bd0a05eaca6df

1

for me a re-install with the package manager worked. I initially didn't have all security updates installed and after that npm was not available. After installing the updates, a reinstall worked fine.

  • Hello Sven, welcome to Ask Ubuntu! Can you include in the answer instructions on how to that? Thanks! =) – hg8 Dec 22 '15 at 15:43

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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