If I use the commands
apt npm install -g npm
or
npm install -g npm@6.14.10
I still get npm@5.6.0. It's really strange. I also removed everything and installed it again, but it didn't work.
Following Error comes:
npm install -g npm
npm WARN npm npm does not support Node.js v14.15.3
npm WARN npm You should probably upgrade to a newer version of node as we
npm WARN npm can't make any promises that npm will work with this version.
npm WARN npm Supported releases of Node.js are the latest release of 4, 6, 7, 8, 9.
npm WARN npm You can find the latest version at https://nodejs.org/
npm ERR! cb.apply is not a function
npm ERR! A complete log of this run can be found in:
npm ERR! /home/tom/.npm/_logs/2021-01-03T11_35_05_408Z-debug.log
npm version
npm WARN npm npm does not support Node.js v14.15.3
npm WARN npm You should probably upgrade to a newer version of node as we
npm WARN npm can't make any promises that npm will work with this version.
npm WARN npm Supported releases of Node.js are the latest release of 4, 6, 7, 8, 9.
npm WARN npm You can find the latest version at https://nodejs.org/
{
npm: '5.6.0',
ares: '1.16.1',
brotli: '1.0.9',
cldr: '37.0',
icu: '67.1',
llhttp: '2.1.3',
modules: '83',
napi: '7',
nghttp2: '1.41.0',
node: '14.15.3',
openssl: '1.1.1g',
tz: '2020a',
unicode: '13.0',
uv: '1.40.0',
v8: '8.4.371.19-node.17',
zlib: '1.2.11'
}
Don't know what I need to change, to solve my problem. I am very thankfull for every help.
Update: (thanks to @Mr.)
Using command: npm upgrade -g npm --verbose
npm info it worked if it ends with ok
npm WARN npm npm does not support Node.js v14.15.3
npm WARN npm You should probably upgrade to a newer version of node as we
npm WARN npm can't make any promises that npm will work with this version.
npm WARN npm Supported releases of Node.js are the latest release of 4, 6, 7, 8, 9.
npm WARN npm You can find the latest version at https://nodejs.org/
npm verb cli [
npm verb cli '/usr/bin/node',
npm verb cli '/usr/local/bin/npm',
npm verb cli 'upgrade',
npm verb cli '-g',
npm verb cli 'npm',
npm verb cli '--verbose'
npm verb cli ]
npm info using npm@5.6.0
npm info using node@v14.15.3
npm verb npm-session 78951400057ee470
npm verb update computing outdated modules to update
npm verb stack TypeError: cb.apply is not a function
npm verb stack at /usr/local/lib/node_modules/npm/node_modules/graceful-fs/polyfills.js:287:18
npm verb stack at FSReqCallback.oncomplete (fs.js:184:5)
npm verb cwd /home/tom
npm verb Linux 5.4.0-58-generic
npm verb argv "/usr/bin/node" "/usr/local/bin/npm" "upgrade" "-g" "npm" "--verbose"
npm verb node v14.15.3
npm verb npm v5.6.0
npm ERR! cb.apply is not a function
npm verb exit [ 1, true ]