当前位置:   article > 正文

vue创建项目失败(Error: EPERM: operation not permitted)

vue创建项目失败(Error: EPERM: operation not permitted)

项目报错,not permitted是不允许、没有权限,解决方法就是需要改一下node所在盘下面的权限

  1. npm ERR! code EPERM
  2. npm ERR! syscall mkdir
  3. npm ERR! path C:\Program Files\nodejs\node_cache\_cacache
  4. npm ERR! errno -4048
  5. npm ERR! Error: EPERM: operation not permitted, mkdir 'C:\Program Files\nodejs\node_cache\_cacache'
  6. npm ERR! [OperationalError: EPERM: operation not permitted, mkdir 'C:\Program Files\nodejs\node_cache\_cacache'] {
  7. npm ERR! cause: [Error: EPERM: operation not permitted, mkdir 'C:\Program Files\nodejs\node_cache\_cacache'] {
  8. npm ERR! errno: -4048,
  9. npm ERR! code: 'EPERM',
  10. npm ERR! syscall: 'mkdir',
  11. npm ERR! path: 'C:\\Program Files\\nodejs\\node_cache\\_cacache'
  12. npm ERR! },
  13. npm ERR! isOperational: true,
  14. npm ERR! errno: -4048,
  15. npm ERR! code: 'EPERM',
  16. npm ERR! syscall: 'mkdir',
  17. npm ERR! path: 'C:\\Program Files\\nodejs\\node_cache\\_cacache'
  18. npm ERR! }
  19. npm ERR!
  20. npm ERR! The operation was rejected by your operating system.
  21. npm ERR! It's possible that the file was already in use (by a text editor or antivirus),
  22. npm ERR! or that you lack permissions to access it.
  23. npm ERR!
  24. npm ERR! If you believe this might be a permissions issue, please double-check the
  25. npm ERR! permissions of the file and its containing directories, or try running
  26. npm ERR! the command again as root/Administrator.

更改权限需要右键打开属性,在安全中点击高级

双击第一个将权限改为完全控制(这里我已经改过了)

扫描结束后,应该就可以成功创建项目了,如果还不成功,有可能是无法递归到node的文件内,需要右键node内的属性,将node内的文件都改为完全控制的权限

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/繁依Fanyi0/article/detail/831020
推荐阅读
相关标签
  

闽ICP备14008679号