npm install 失败问题

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.

发现是缓存问题导致。解决办法:

1/删除node modules中的全部文件。
2/清除npm缓存 , 命令 npm cache clean --force。

posted @ 2020-04-14 17:34  杨大凯  阅读(4460)  评论(0)    收藏  举报