我正在尝试使用命令curl -L https://npmjs.org/install.sh | sudo sh
安装npm,但我收到以下错误:
module.js:340
throw err;
^
Error: Cannot find module '/tmp/npm.8156/package/bin/read-package-json.js'
at Function.Module._resolveFilename (module.js:338:15)
at Function.Module._load (module.js:280:25)
at Function.Module.runMain (module.js:497:10)
at startup (node.js:119:16)
at node.js:935:3
/tmp/npm.8156/package/lib/utils/unsupported.js:28
console.error(`a bug known to break npm. Please update to at least ${r
^
SyntaxError: Unexpected token ILLEGAL
at Module._compile (module.js:439:25)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at /tmp/npm.8156/package/bin/npm-cli.js:19:21
at Object.<anonymous> (/tmp/npm.8156/package/bin/npm-cli.js:92:3)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
/tmp/npm.8156/package/lib/utils/unsupported.js:28
console.error(`a bug known to break npm. Please update to at least ${r
^
SyntaxError: Unexpected token ILLEGAL
at Module._compile (module.js:439:25)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at /tmp/npm.8156/package/bin/npm-cli.js:19:21
at Object.<anonymous> (/tmp/npm.8156/package/bin/npm-cli.js:92:3)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
It failed
导致此错误的原因是什么?可以做些什么来解决这个问题?