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/cli@6.1.5 -save-dev

解决方法:
1)删除原有的node_modules文件夹,即C:\Users\zhang\AppData\Roaming\npm\node_modules
【npm WARN checkPermissions Missing write access to C:\Users\zhang\AppData\Roaming\npm\node_modules\@a】2)重新执行安装命令:npm install -g @angular/cli@6.1.5 -save-dev

    推荐阅读