The repository no longer supports self-signed certificates. You need to upgrade npm
.
// Disable the certificate temporarily in order to do the upgrade
npm config set ca ""
// Upgrade npm. -g (global) means you need root permissions; be root
// or prepend `sudo`
sudo npm install npm -g
// Undo the previous config change
npm config delete ca
// For Ubuntu/Debian-sid/Mint, node package is renamed to nodejs which
// npm cannot find. Fix this:
sudo ln -s /usr/bin/nodejs /usr/bin/node
You need to open a new terminal session in order to use the updated npm
.
Source: This was originally an edit on jnylen's answer. Although the guidelines say "We welcome all constructive edits, but please make them substantial," the edit was rejected due to "This edit changes too much in the original post; the original meaning or intent of the post would be lost." I guess the community prefers a separate answer.