文章目录

  • 报错全文
  • 报错原因
  • 解决方法一
  • 解决方法二

报错全文

npm ERR! code EPERM
npm ERR! syscall open
npm ERR! path D:\node.js\node_cache\_cacache\tmp\ea5120a8
npm ERR! errno EPERM
npm ERR! FetchError: Invalid response body while trying to fetch https://registry.npm.taobao.org/@vue%2fcli-plugin-babel: EPERM: operation not permitted, open 'D:\node.js\node_cache\_cacache\tmp\ea5120a8'
npm ERR!     at D:\node.js\node_modules\npm\node_modules\minipass-fetch\lib\body.js:162:15
npm ERR!     at async Arborist.[nodeFromEdge] (D:\node.js\node_modules\npm\node_modules\@npmcli\arborist\lib\arborist\build-ideal-tree.js:1061:19)
npm ERR!     at async Arborist.[buildDepStep] (D:\node.js\node_modules\npm\node_modules\@npmcli\arborist\lib\arborist\build-ideal-tree.js:930:11)
npm ERR!     at async Arborist.buildIdealTree (D:\node.js\node_modules\npm\node_modules\@npmcli\arborist\lib\arborist\build-ideal-tree.js:216:7)
npm ERR!     at async Promise.all (index 1)
npm ERR!     at async Arborist.reify (D:\node.js\node_modules\npm\node_modules\@npmcli\arborist\lib\arborist\reify.js:149:5)
npm ERR!     at async Install.install (D:\node.js\node_modules\npm\lib\install.js:170:5)
npm ERR!  FetchError: Invalid response body while trying to fetch https://registry.npm.taobao.org/@vue%2fcli-plugin-babel: EPERM: operation not permitted, open 'D:\node.js\node_cache\_cacache\tmp\ea5120a8'
npm ERR!     at D:\node.js\node_modules\npm\node_modules\minipass-fetch\lib\body.js:162:15
npm ERR!     at async Arborist.[nodeFromEdge] (D:\node.js\node_modules\npm\node_modules\@npmcli\arborist\lib\arborist\build-ideal-tree.js:1061:19)
npm ERR!     at async Arborist.[buildDepStep] (D:\node.js\node_modules\npm\node_modules\@npmcli\arborist\lib\arborist\build-ideal-tree.js:930:11)
npm ERR!     at async Arborist.buildIdealTree (D:\node.js\node_modules\npm\node_modules\@npmcli\arborist\lib\arborist\build-ideal-tree.js:216:7)
npm ERR!     at async Promise.all (index 1)
npm ERR!     at async Arborist.reify (D:\node.js\node_modules\npm\node_modules\@npmcli\arborist\lib\arborist\reify.js:149:5)
npm ERR!     at async Install.install (D:\node.js\node_modules\npm\lib\install.js:170:5) {npm ERR!   code: 'EPERM',
npm ERR!   errno: 'EPERM',
npm ERR!   syscall: 'open',
npm ERR!   path: 'D:\\node.js\\node_cache\\_cacache\\tmp\\ea5120a8',
npm ERR!   type: 'system',
npm ERR!   requiredBy: '.'
npm ERR! }
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.ERROR  command failed: npm install --loglevel error --legacy-peer-deps

报错原因

安装Node的时候安装在D盘,导致Node.js权限不够

解决方法一

找到安装Node时候的文件夹,右键进入属性,点击安全,点击高级

进入如下界面,双击第一个用户,选定进行权限修改的对象。点击更改权限。

勾选修改权限(有人也说直接勾选完全控制,但是我只勾选了修改之后验证是可行的,保险一点还是推荐不要勾选完全控制

解决方法二

直接删除在C:\Users{账户}\下的.npmrc文件,删除之后node.js全局配置会自动恢复至C盘

还是推荐第一种方法叭

Vue脚手架创建项目报错 ERROR command failed: npm install --loglevel error --legacy-peer-deps相关推荐

  1. 8种方法解决vue创建项目报错:command failed: npm install --loglevel error

    8种方法解决vue项目创建失败问题 1.重建项目 2.清除缓存 3.重装淘宝源 4.修改useTaobaoRegistry 5.重装node 6.删除npmrc文件 7. node版本问题 8.css ...

  2. 创建 vue 项目 报错:command failed: npm install --loglevel error --legacy-peer-deps

    用 vue-cli 创建vue项目时,报了个错: command failed: npm install --loglevel error --legacy-peer-deps,.然后看报错信息,装了 ...

  3. 使用vue-cli3创建项目的时候出错,ERROR command failed: npm install --loglevel error --registry

    重点:方法三 命令: vue create vue-hello 错误提示: ERROR command failed: npm install --loglevel error --registry ...

  4. ERROR command failed: npm install --loglevel error --legacy-peer-deps

    一.问题场景 MacBook Air 创建 vue 项目时报错:ERROR command failed: npm install --loglevel error --legacy-peer-dep ...

  5. 【Python异常】 NPM创建Vue项目遇到ERROR command failed: npm install --loglevel error

    遇到问题: Vue CLI v4.5.6 ┌─────────────────────────────────────────┐ │ │ │ New version available 4.5.6 → ...

  6. mac电脑解决Error: command failed: npm install --loglevel error --legacy-peer-deps

    使用vue create xxx创建vue3项目的时候报错. 解决步骤: 1.sudo npm cache clean --force 2.再次创建就可以成功 补充:网上搜到很多方法,都尝试失败,因为 ...

  7. 解决问题: Error: command failed: npm install --loglevel error --legacy-peer-deps

    在启动vue脚手架的时候,出现了一个错误: 在经过查询后 删除了.npmrc文件并且修改了.vuerc文件,但是依然不起作用 再修改vuerc文件 将useTaobaoRegistry修改为false ...

  8. 解决 ERROR command failed: npm install --loglevel error --legacy-peer-deps

    从原本的cmd环境换到管理员环境 或者powershell的管理员模式都可以

  9. vue脚手架创建项目报错

    Vue报错:command failed: npm install --loglevel error --registry=https://registry.npm.taobao.org 解决方案:n ...

  10. vue ui 可视化界面 创建项目 报错:command failed: yarn --json。。。。。

    清除npm缓存 npm cache clean --force 然后重新启动 vue ui,这次创建项目成功了

最新文章

  1. java校验ip格式_JAVA IP地址格式验证,使用正则表达式
  2. python2.6更改为Python2.7
  3. 前端性能优化-图像优化
  4. java 换行 运算符格式_Java代码样式运算符换行格式
  5. es6 next()、throw()、return() 的共同点
  6. tomcat7.0.55配置单向和双向HTTPS连接
  7. Springboot之Thymeleaf 表单提交
  8. 菜单设计器(Menu Designer)及其B/S,C/S双重实现(B/S开源)
  9. JDK 1.8 - 1.7
  10. 用Java写一个浪费cpu的程序_Java程序是如何浪费内存的
  11. RTCM1005详解
  12. Linux入门及安装教程
  13. impress.js css模板,使用impress.js制作幻灯片
  14. 高通和LG携手于2018年开始测试5G车辆互联网;Google 宣布攻破 SHA-1 加密│IoT黑板报...
  15. 【2013年度CSDN博客之星】评奖:全文五言句,俺也拉个票
  16. Oracle应用之merge合并更新函数
  17. xfplay(先锋影音) v8.9.6 官方版​
  18. 学术论文常用写作结构
  19. 第一章 管理与管理学 第一节 管理活动
  20. 个网工获得CCNP认证后的成功求职记

热门文章

  1. mybatis事务处理
  2. 常见设计模式之(五):观察者模式
  3. CC2430基础——IAR的安装及配置
  4. 存储容量(空间)换算公式(B、KB、MB、GB、TB、PB、EB)
  5. php 图片后加参数缩图,智能的PHP缩图类
  6. python办公自动化(十一)自动分类文件夹
  7. 路由的几个基本概念-直连路由/网关路由/主机路由/网络路由/动态路由/静态路由/默认路由
  8. oracle数据库imp命令,数据库imp导入命令
  9. linux 下多个图片合并,FFmpeg将多张图片合成视频
  10. 【python 走进NLP】hanNLP 简繁拼音转换