首页 前端知识 npm install安装失败报错:The operation was rejected by your operating system

npm install安装失败报错:The operation was rejected by your operating system

2024-05-13 10:05:51 前端知识 前端哥 248 172 我要收藏

报错信息:

The operation was rejected by your operating system.
npm ERR! It is likely you do not have the permissions to access this file as the current user

报错原因: 没有开放权限

解决方案:

执行

sudo chown -R $(whoami) $(npm config get prefix)/{lib/node_modules,bin,share}

备注: 清除npm缓存命令

npm install --registry=https://registry.npm.taobao.org --loglevel=silly
npm cache clean --force
npm install
转载请注明出处或者链接地址:https://www.qianduange.cn//article/8521.html
标签
评论
会员中心 联系我 留言建议 回顶部
复制成功!