Sometimes, but not every time, Npm shows a "New version of npm available" printout after the install completes:
$ notion install cowsay 1.3.0
Fetching cowsay-v1.3.0 [========================================] 100%
npm notice created a lockfile as package-lock.json. You should commit this file.
added 9 packages from 2 contributors and audited 1535 packages in 30.198s
found 0 vulnerabilities
โญโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ โ
โ New minor version of npm available! 6.7.0 โ 6.9.0 โ
โ Changelog: https://github.com/npm/cli/releases/tag/v6.9.0 โ
โ Run npm install -g npm to update! โ
โ โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
This is annoying, and won't work because we will block the global install.
There is probably a way to suppress this (env variable, or a setting somewhere).
From this issue https://github.com/npm/npm/issues/17453, it looks like we may be able to set NO_UPDATE_NOTIFIER when calling npm to suppress that message.
Just wanted to note that I'm getting this also when running various npm commands, like npm run lint:
โ npm run lint:js
> [email protected] lint:js ~/path/to/project
> eslint .
โญโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ โ
โ New minor version of npm available! 6.4.1 โ 6.10.1 โ
โ Changelog: https://github.com/npm/cli/releases/tag/v6.10.1 โ
โ Run npm install -g npm to update! โ
โ โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
Running npm install -g npm as instructed then shows this error:
โ npm install -g npm
Volta error: Global package installs are not supported.
Use `volta install npm` to add a package to your toolchain (see `volta help install` for more info).
Which then leads to running this command, and getting this error:
โ volta install npm
error: Installing npm is not supported yet.
Hi @kimroen, thanks for raising that! We're tracking adding support for installing a specific version of npm in #292.
In the interim, this is a bad UX and we should update our error messaging to explicitly call-out (in npm install -g npm) that it's not supported yet instead of telling you to do something that then itself errors out.
Most helpful comment
Hi @kimroen, thanks for raising that! We're tracking adding support for installing a specific version of
npmin #292.In the interim, this is a bad UX and we should update our error messaging to explicitly call-out (in
npm install -g npm) that it's not supported yet instead of telling you to do something that then itself errors out.