I see lots of questions (including from me, and one in the FAQ) about changing the version of node that a project uses, but my search has not turned up anything about npm.
If I go to the terminal in my new project and run a command like npm test
I get the message New major version of npm available! 7.20.6 -> 8.11.0
. Is this something I can upgrade myself, or should I just wait for some kind of a system-wide upgrade?
FWIW, if I try to run the suggested command in the message, npm install -g [email protected]
, I get the following:
$ npm install -g [email protected]
npm ERR! code EROFS
npm ERR! syscall rename
npm ERR! path /opt/nvm/versions/node/v16.14.2/lib/node_modules/npm
npm ERR! dest /opt/nvm/versions/node/v16.14.2/lib/node_modules/.npm-St7fCqPi
npm ERR! errno -30
npm ERR! rofs EROFS: read-only file system, rename '/opt/nvm/versions/node/v16.14.2/lib/node_modules/npm' -> '/opt/nvm/versions/node/v16.14.2/lib/node_modules/.npm-St7fCqPi'
npm ERR! rofs Often virtualized file systems, or other file systems
npm ERR! rofs that don't support symlinks, give this error.
npm ERR! A complete log of this run can be found in:
npm ERR! /tmp/npm-cache/16.14.2/_logs/2022-05-25T22_39_52_512Z-debug.log