脚本宝典收集整理的这篇文章主要介绍了

npm安装报错Error: EPERM: operation not permitted已解决

脚本宝典小编觉得挺不错的,现在分享给大家,也给大家做个参考,希望能帮助你少写一行代码,多一份安全和惬意。

npm ERR! path D:dataCenterbi-frontend-basenode_modulesnycnode_modulesarchynpm-shrinkwrap.json
npm ERR! code EPERM
npm ERR! errno -4048
npm ERR! syscall open
npm ERR! Error: EPERM: operation not permitted, open 'D:dataCenterbi-frontend-basenode_modulesnycnode_modulesarchynpm-shrinkwrap.json'
npm ERR!  { [Error: EPERM: operation not permitted, open 'D:dataCenterbi-frontend-basenode_modulesnycnode_modulesarchynpm-shrinkwrap.json']
npm ERR!   cause:
npm ERR!    { Error: EPERM: operation not permitted, open 'D:dataCenterbi-frontend-basenode_modulesnycnode_modulesarchynpm-shrinkwrap.json'
npm ERR!      errno: -4048,
npm ERR!      code: 'EPERM',
npm ERR!      syscall: 'open',
npm ERR!      path:
npm ERR!       'D:\dataCenter\bi-frontend-base\node_modules\nyc\node_modules\archy\npm-shrinkwrap.json' },
npm ERR!   isOperational: true,
npm ERR!   stack:
npm ERR!    'Error: EPERM: operation not permitted, open 'D:\dataCenter\bi-frontend-base\node_modules\nyc\node_modules\archy\npm-shrinkwrap.json'',
npm ERR!   errno: -4048,
npm ERR!   code: 'EPERM',
npm ERR!   syscall: 'open',
npm ERR!   path:
npm ERR!    'D:\dataCenter\bi-frontend-base\node_modules\nyc\node_modules\archy\npm-shrinkwrap.json',
npm ERR!   parent: 'nyc' }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It's possible that the file was already in use (by a text editor or antivirus),
npm ERR! or that you lack permissions to access it.
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!     D:MyConfigurationzr02718AppDataRoamingnpm-cache_logs2019-03-19T07_19_58_886Z-debug.log

删除当前用户目录下面的.npmrc文件重新安装即可。这个文件不一定在哪里,在当前用户目录下面,可能在C盘也可能再D盘

总结

以上是脚本宝典为你收集整理的

npm安装报错Error: EPERM: operation not permitted已解决

全部内容,希望文章能够帮你解决

npm安装报错Error: EPERM: operation not permitted已解决

所遇到的程序开发问题,欢迎加入QQ群277859234一起讨论学习。如果觉得脚本宝典网站内容还不错,欢迎将脚本宝典网站推荐给程序员好友。 本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。

80%的人都看过