pi@raspberrypi:~ $ sudo npm -g install npm
npm ERR! Linux 5.4.51-v7+
npm ERR! argv "/usr/bin/node" "/usr/local/bin/npm" "-g" "install" "npm"
npm ERR! node v12.18.3
npm ERR! npm v3.10.10
npm ERR! cb.apply is not a function
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! <https://github.com/npm/npm/issues>
npm ERR! Please include the following file with any support request:
npm ERR! /home/pi/npm-debug.log
Log
0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/node', '/usr/local/bin/npm', '-g', 'install', 'npm' ]
2 info using npm@3.10.10
3 info using node@v12.18.3
4 silly loadCurrentTree Starting
5 silly install loadCurrentTree
6 silly install readGlobalPackageData
7 silly fetchPackageMetaData npm
8 silly fetchNamedPackageData npm
9 silly mapToRegistry name npm
10 silly mapToRegistry using default registry
11 silly mapToRegistry registry https://registry.npmjs.org/
12 silly mapToRegistry data Result {
12 silly mapToRegistry raw: 'npm',
12 silly mapToRegistry scope: null,
12 silly mapToRegistry escapedName: 'npm',
12 silly mapToRegistry name: 'npm',
12 silly mapToRegistry rawSpec: '',
12 silly mapToRegistry spec: 'latest',
12 silly mapToRegistry type: 'tag'
12 silly mapToRegistry }
13 silly mapToRegistry uri https://registry.npmjs.org/npm
14 verbose request uri https://registry.npmjs.org/npm
15 verbose request no auth needed
16 info attempt registry request try #1 at 21:44:18
17 verbose request id d325dc5cdad7a500
18 http request GET https://registry.npmjs.org/npm
19 http 200 https://registry.npmjs.org/npm
20 verbose headers {
20 verbose headers date: 'Sat, 08 Aug 2020 19:44:18 GMT',
20 verbose headers 'content-type': 'application/json',
20 verbose headers 'transfer-encoding': 'chunked',
20 verbose headers connection: 'keep-alive',
20 verbose headers 'set-cookie': [
20 verbose headers '__cfduid=d3c69352a4e2e61d7edcf4ac4641018fd1596915858; expires=Mon, 07-Sep-20 19:44:18 GMT; path=/; domain=.npmjs.org; HttpOnly; SameSite=Lax'
20 verbose headers ],
20 verbose headers 'cf-ray': '5bfbbb32aa9dedf7-CDG',
20 verbose headers age: '6861',
20 verbose headers 'cache-control': 'public, max-age=300',
20 verbose headers etag: 'W/"2cdde730c04eafef72fc7e989f1d4445"',
20 verbose headers 'last-modified': 'Fri, 07 Aug 2020 18:39:29 GMT',
20 verbose headers vary: 'accept-encoding, accept',
20 verbose headers 'cf-cache-status': 'HIT',
20 verbose headers 'cf-request-id': '04713353ab0000edf72d9e1200000001',
20 verbose headers 'expect-ct': 'max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"',
20 verbose headers server: 'cloudflare',
20 verbose headers 'content-encoding': 'gzip'
20 verbose headers }
21 silly get cb [
21 silly get 200,
21 silly get {
21 silly get date: 'Sat, 08 Aug 2020 19:44:18 GMT',
21 silly get 'content-type': 'application/json',
21 silly get 'transfer-encoding': 'chunked',
21 silly get connection: 'keep-alive',
21 silly get 'set-cookie': [
21 silly get '__cfduid=d3c69352a4e2e61d7edcf4ac4641018fd1596915858; expires=Mon, 07-Sep-20 19:44:18 GMT; path=/; domain=.npmjs.org; HttpOnly; SameSite=Lax'
21 silly get ],
21 silly get 'cf-ray': '5bfbbb32aa9dedf7-CDG',
21 silly get age: '6861',
21 silly get 'cache-control': 'public, max-age=300',
21 silly get etag: 'W/"2cdde730c04eafef72fc7e989f1d4445"',
21 silly get 'last-modified': 'Fri, 07 Aug 2020 18:39:29 GMT',
21 silly get vary: 'accept-encoding, accept',
21 silly get 'cf-cache-status': 'HIT',
21 silly get 'cf-request-id': '04713353ab0000edf72d9e1200000001',
21 silly get 'expect-ct': 'max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"',
21 silly get server: 'cloudflare',
21 silly get 'content-encoding': 'gzip'
21 silly get }
21 silly get ]
22 verbose get saving npm to /root/.npm/registry.npmjs.org/npm/.cache.json
23 verbose correctMkdir /root/.npm correctMkdir not in flight; initializing
24 verbose stack TypeError: cb.apply is not a function
24 verbose stack at /usr/local/lib/node_modules/npm/node_modules/graceful-fs/polyfills.js:267:18
24 verbose stack at FSReqCallback.oncomplete (fs.js:169:5)
25 verbose cwd /home/pi
26 error Linux 5.4.51-v7+
27 error argv "/usr/bin/node" "/usr/local/bin/npm" "-g" "install" "npm"
28 error node v12.18.3
29 error npm v3.10.10
30 error cb.apply is not a function
31 error If you need help, you may report this error at:
31 error <https://github.com/npm/npm/issues>
32 verbose exit [ 1, true ]