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.

3 Answers 3

1

you can install npm using this command:

sudo apt-get install npm
2
  • Thanks, but nodejs from nodesource includes npm already. There's no longer any reason to install npm separately.
    – csturtz
    Feb 23, 2015 at 16:13
  • btw, for precise (12.04LTS) the npm version is 1.1.4. packages.ubuntu.com/precise/npm Feb 24, 2015 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.

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .