首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >npm错误!该操作被您的操作系统拒绝。

问npm错误!该操作被您的操作系统拒绝。
EN

Stack Overflow用户
提问于 2020-05-04 08:52:18
回答 1查看 11K关注 0票数 4
代码语言:javascript
复制
npm install -g create-react-app
npm WARN checkPermissions Missing write access to /usr/local/lib/node_modules
npm ERR! code EACCES
npm ERR! syscall access
npm ERR! path /usr/local/lib/node_modules
npm ERR! errno -13
npm ERR! Error: EACCES: permission denied, access '/usr/local/lib/node_modules'
npm ERR!  { Error: EACCES: permission denied, access '/usr/local/lib/node_modules'
npm ERR!   stack: 'Error: EACCES: permission denied, access \'/usr/local/lib/node_modules\'',
npm ERR!   errno: -13,
npm ERR!   code: 'EACCES',
npm ERR!   syscall: 'access',
npm ERR!   path: '/usr/local/lib/node_modules' }
npm ERR! 
npm ERR! 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
npm ERR! 
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/legend/.npm/_logs/2020-05-04T08_45_14_806Z-debug.log
EN

回答 1

Stack Overflow用户

发布于 2020-05-04 13:33:18

在全局安装模块时需要管理权限,使用sudo运行命令:

代码语言:javascript
复制
sudo npm install -g create-react-app
票数 8
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/61588414

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档