npm WARN checkPermissions Missing write access to C:\Users\zhang\AppData\Roaming\npm\node_modules\@a

npm WARN checkPermissions Missing write access to C:\Users\zhang\AppData\Roaming\npm\node_modules\@angular\cli\node_modules\camelcase
npm WARN checkPermissions Missing write access to C:\Users\zhang\AppData\Roaming\npm\node_modules\@angular\cli\node_modules\kind-of
npm WARN checkPermissions Missing write access to C:\Users\zhang\AppData\Roaming\npm\node_modules\@angular\cli\node_modules\fsevents
npm WARN checkPermissions Missing write access to C:\Users\zhang\AppData\Roaming\npm\node_modules\@angular\cli\node_modules\source-map
npm ERR! path C:\Users\zhang\AppData\Roaming\npm\node_modules\@angular\cli\node_modules\camelcase
npm ERR! code ENOENT
npm ERR! errno -4058
npm ERR! syscall access
npm ERR! enoent ENOENT: no such file or directory, access 'C:\Users\zhang\AppData\Roaming\npm\node_modules\@angular\cli\node_modules\camelcase'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\zhang\AppData\Roaming\npm-cache\_logs\2018-09-03T06_37_14_187Z-debug.log

===================================================================================

以上错误是重新全局安装angular-cli的时候出现的:
npm uninstall -g @angular/cli
npm cache verify
npm install -g @angular/[email protected] -save-dev

解决方法:

1)删除原有的node_modules文件夹,即C:\Users\zhang\AppData\Roaming\npm\node_modules

2)重新执行安装命令:npm install -g @angular/[email protected] -save-dev

发布了244 篇原创文章 · 获赞 75 · 访问量 127万+

猜你喜欢

转载自blog.csdn.net/zhangbest2009/article/details/82348645