首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >基于角度6的工程中npm更新的误差分析

基于角度6的工程中npm更新的误差分析
EN

Stack Overflow用户
提问于 2018-08-23 07:07:22
回答 1查看 195关注 0票数 2

我想使用cli命令从NPM6.1.0更新NPM6.4.0的新版本

安装-g npm

但是我在更新的时候出错了

代码语言:javascript
复制
npm ERR! path /usr/local/lib/node_modules/npm/node_modules/ansi-regex
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall access
npm ERR! Error: EACCES: permission denied, access '/usr/local/lib/node_modules/npm/node_modules/ansi-regex'
npm ERR!  { Error: EACCES: permission denied, access '/usr/local/lib/node_modules/npm/node_modules/ansi-regex'
npm ERR!   stack: 'Error: EACCES: permission denied, access \'/usr/local/lib/node_modules/npm/node_modules/ansi-regex\'',
npm ERR!   errno: -13,
npm ERR!   code: 'EACCES',
npm ERR!   syscall: 'access',
npm ERR!   path: '/usr/local/lib/node_modules/npm/node_modules/ansi-regex' }
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 (though this is not recommended).

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/user/.npm/_logs/2018-08-23T06_53_24_306Z-debug.log
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2018-08-23 07:08:41

对于ubuntu/linux,您必须使用以下命令:

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

https://stackoverflow.com/questions/51980123

复制
相关文章

相似问题

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