• WSL中使用npm install报错


    报错内容类似下面的格式。具体解决方法请看这里:https://github.com/Microsoft/WSL/issues/14
    着重关注 https://github.com/Microsoft/WSL/issues/14#issuecomment-207504657https://github.com/Microsoft/WSL/issues/14#issuecomment-514342783

    以前记录这种踩坑的文章,纯粹是把原文的解决方法粘过来。以后如果没有原创内容,直接贴链接和报错提示,方便来访的读者。

    ➜  * git:(master) ✗ npm install
    npm ERR! code EACCES
    npm ERR! syscall rename
    npm ERR! path /home/*/Project/*/node_modules/array-sort
    npm ERR! dest /home/*/Project/*/node_modules/.array-sort.DELETE
    npm ERR! errno -13
    npm ERR! Error: EACCES: permission denied, rename '/home/*/Project/*/node_modules/array-sort' -> '/home/*/Project/*/node_modules/.array-sort.DELETE'
    npm ERR!  [OperationalError: EACCES: permission denied, rename '/home/*/Project/*/node_modules/array-sort' -> '/home/*/Project/*/node_modules/.array-sort.DELETE'] {
    npm ERR!   cause: [Error: EACCES: permission denied, rename '/home/*/Project/*/node_modules/array-sort' -> '/home/*/Project/*/node_modules/.array-sort.DELETE'] {
    npm ERR!     errno: -13,
    npm ERR!     code: 'EACCES',
    npm ERR!     syscall: 'rename',
    npm ERR!     path: '/home/*/Project/*/node_modules/array-sort',
    npm ERR!     dest: '/home/*/Project/*/node_modules/.array-sort.DELETE'
    npm ERR!   },
    npm ERR!   stack: "Error: EACCES: permission denied, rename '/home/*/Project/*/node_modules/array-sort' -> '/home/*/Project/*/node_modules/.array-sort.DELETE'",
    npm ERR!   errno: -13,
    npm ERR!   code: 'EACCES',
    npm ERR!   syscall: 'rename',
    npm ERR!   path: '/home/*/Project/*/node_modules/array-sort',
    npm ERR!   dest: '/home/*/Project/*/node_modules/.array-sort.DELETE',
    npm ERR!   parent: 'MyIP'
    npm ERR! }
    npm ERR! 
    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.
    
    npm ERR! A complete log of this run can be found in:
    npm ERR!     /home/*/.npm/_logs/2019-12-24T05_53_16_578Z-debug.log
    
  • 相关阅读:
    druid连接池的配置和应用
    Maven的Unknow错误
    实践——WebStorm安装(2021/01/30)(更新2021/07/14,添加激活码和习惯设置)
    vue3如何编写挂载DOM的插件
    npm 安装源
    一个node项目的docker镜像制作
    圣女
    基于计算机视觉的车牌识别系统(一)
    vue3 兄弟组件传参mitt
    laravel-admin 加载样式失败
  • 原文地址:https://www.cnblogs.com/zhuxiaoxi/p/12091185.html
Copyright © 2020-2023  润新知