【问题标题】:npm install -g yo generator-code is not workingnpm install -g yo generator-code 不工作
【发布时间】:2022-08-03 19:46:42
【问题描述】:

每当我在终端中输入此命令时

npm install -g yo generator-code

该模块不断向我抛出此错误。

npm ERR! code 127
npm ERR! path /root/.nvm/versions/node/v16.13.2/lib/node_modules/yo/node_modules/core-js
npm ERR! command failed
npm ERR! command sh -c node -e \"try{require(\'./postinstall\')}catch(e){}\"
npm ERR! sh: 1: node: Permission denied

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2022-02-04T07_34_50_660Z-debug.log

标签: node.js npm yo


【解决方案1】:

看起来像权限错误。如果您使用的是 ubuntu 操作系统,请使用须藤命令。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-05-04
    • 2015-04-09
    • 2015-04-09
    • 2018-06-06
    相关资源
    最近更新 更多