Friday, May 12, 2017

14.04 - How can I update npm?

I'm trying to install Yeoman so I can install AngularJS, but I run into problems regarding the version of npm. Here's the output when I run npm install -g yo:



npm WARN deprecated npmconf@2.1.2: this package has been reintegrated into npm and is now out of date with respect to npm
/home/marieficid/.node/bin/yo -> /home/marieficid/.node/lib/node_modules/yo/lib/cli.js

> yo@1.6.0 postinstall /home/marieficid/.node/lib/node_modules/yo

> yodoctor


Yeoman Doctor
Running sanity checks on your system

✔ Global configuration file is valid
✖ Node.js version

Your Node.js version is outdated.

Upgrade to the latest version: https://nodejs.org

✔ No .bowerrc file in home directory
✔ No .yo-rc.json file in home directory
✖ npm version

Your npm version is outdated.

Upgrade to the latest version by running:
npm install -g npm


✔ NODE_PATH matches the npm root

Found potential issues on your machine :(
/home/marieficid/.node/lib
└── yo@1.6.0


And here's the output when I run npm install -g npm@latest (my current version is 3.7.3):




/home/marieficid/.node/bin/npm -> /home/marieficid/.node/lib/node_modules/npm/bin/npm-cli.js
/home/marieficid/.node/lib
└── npm@3.7.3


Anyone knows how to fix this?



EDIT: running sudo npm --version returns 2.14.12 instead of 3.7.3.

No comments:

Post a Comment

11.10 - Can't boot from USB after installing Ubuntu

I bought a Samsung series 5 notebook and a very strange thing happened: I installed Ubuntu 11.10 from a usb pen drive but when I restarted (...