使用节点包管理器时出现错误

时间:2019-02-22 10:15:27

标签: ubuntu npm

我正在UBUNTU上使用节点软件包管理器(npm),并且如果尝试使用npm做任何事情,例如。 npm -v给我以下错误。

> /usr/lib/node_modules/npm/node_modules/npm-package-arg/npa.js:6 let
> url ^^^ SyntaxError: Unexpected strict mode reserved word
>     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 Object.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-registry-client/lib/access.js:5:11)
>     at Module._compile (module.js:456:26)
>     at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)

我在Google上搜索了很多解决方案,但找不到解决方案。任何建议将不胜感激。

0 个答案:

没有答案
相关问题