【Python异常】 NPM创建Vue项目遇到ERROR command failed: npm install --loglevel error
遇到问题:
Vue CLI v4.5.6
┌─────────────────────────────────────────┐
│ │
│ New version available 4.5.6 → 5.0.4 │
│ Run npm i -g @vue/cli to update! │
│ │
└─────────────────────────────────────────┘
......
npm ERR! gyp ERR! command "D:\\CODEInterpreter\\nodejs16.15\\node.exe" "D:\\CODEFile\\WebCode\\inurse-client\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
npm ERR! gyp ERR! cwd D:\CODEFile\WebCode\inurse-client\node_modules\node-sass
npm ERR! gyp ERR! node -v v16.15.0
npm ERR! gyp ERR! node-gyp -v v3.8.0
npm ERR! gyp ERR! not ok
npm ERR! Build failed with error code: 1npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Administrator\AppData\Local\npm-cache\_logs\2022-06-15T08_17_24_167Z-debug-0.logERROR command failed: npm install --loglevel error
产生原因
参考过其他博客中列举出的几条原因:
- 重建项目
- 清除缓存 : npm cache clean --force
- 重装淘宝源 :npm install -g cnpm --registry=https://registry.npm.taobao.org
- 修改useTaobaoRegistry : 修改C:\Users*****\ .vuerc 中 “useTaobaoRegistry”: true, 改为false
- 重装node解释器
- 删除npmrc文件 : npm install -g cnpm --registry=https://registry.npm.taobao.org
- node版本问题 :将低版本,我就从17降到了14,但是没效果
- css编辑工具选择 :配置 CSS 编译工具时不要选择 node-sass,应该选择 dart-sass
- 管理员身份运行
解决方案
在创建配置项目时候,配置 CSS 编译工具时不要选择 node-sass,应该选择 dart-sass。
【Python异常】 NPM创建Vue项目遇到ERROR command failed: npm install --loglevel error相关推荐
- 使用npm创建vue项目
大家好,我是龙骑士,今天给大家介绍使用npm创建vue项目 在你想要创建项目的文件夹下打开cmd,在命令行窗口输入vue create projectname 作为学习记录,这里全部选择 Vue CL ...
- 使用vue-cli3创建项目的时候出错,ERROR command failed: npm install --loglevel error --registry
重点:方法三 命令: vue create vue-hello 错误提示: ERROR command failed: npm install --loglevel error --registry ...
- ERROR command failed: npm install --loglevel error --legacy-peer-deps
一.问题场景 MacBook Air 创建 vue 项目时报错:ERROR command failed: npm install --loglevel error --legacy-peer-dep ...
- mac电脑解决Error: command failed: npm install --loglevel error --legacy-peer-deps
使用vue create xxx创建vue3项目的时候报错. 解决步骤: 1.sudo npm cache clean --force 2.再次创建就可以成功 补充:网上搜到很多方法,都尝试失败,因为 ...
- 解决问题: Error: command failed: npm install --loglevel error --legacy-peer-deps
在启动vue脚手架的时候,出现了一个错误: 在经过查询后 删除了.npmrc文件并且修改了.vuerc文件,但是依然不起作用 再修改vuerc文件 将useTaobaoRegistry修改为false ...
- ERROR Error: command failed: pnpm install --reporter silent --shamefully-hoist 错误解决办法
使用 vue-cli.pnpm创建新项目遇到的错误如下图所示: 在命令行安装pnpm@6的版本: npm i pnpm@6 -g vue create hello-world 还可以直接使用npm安装 ...
- 脚手架创建遇到报错:Error: command failed: pnpm install --reporter silent --shamefully-hoist
解决方式 : vue create frist-vue -m npm 把pnpm切换成npm
- 解决 ERROR command failed: npm install --loglevel error --legacy-peer-deps
从原本的cmd环境换到管理员环境 或者powershell的管理员模式都可以
- 使用pnpm+vue-cli,出现报错:Error: command failed: pnpm install --reporter silent --shamefully-hoist
问题描述: 因为发现pnpm好用,所以现在全面切为使用pnpm,但是通过pnpm和vue-cli创建项目的时候发生了报错: 解决办法: 将pnpm降级到6就可以: npm install pnpm@6 ...
最新文章
- 实验记录:vsftp整合mysql-pam管理虚拟账号
- 一个案例说出python的十余个语法知识点
- HDOJ 1298 T9(trie树简单应用)
- Jafka源码粗略解读之二--关于JMX
- scale和java比较_浅谈java中BigDecimal的equals与compareTo的区别
- 【渝粤教育】国家开放大学2018年秋季 0699-21T阅读与写作 参考试题
- [剑指offer]面试题第[59-2]题[JAVA][队列的最大值][暴力][双端队列]
- Linux学习第五篇之文件处理命令touch、cat、tac、more、less、head、tail
- mysql query cache
- 逻辑综合工具DesignCompiler使用教程
- 鸿星尔克向河南博物院捐款100万元用于灾后重建
- 手写Maven的archetype项目脚手架
- 胆战心惊形容什么_胆战心惊的近义词
- 【眼底图像数据集】视杯 视盘分割
- SAM数据格式学习1之CIGAR理解
- 面试磕磕碰碰,辛得蚂蚁高级工程师的技术笔记指导,终获P7岗offer
- javascript入门实例:实现简单网页功能
- Python入门习题大全——喜欢的水果
- wifi卡慢延迟高_家中无线突然很慢/卡顿怎么办?路由器增强WiFi信号的几种方法...
- API比较PostMessageA和SendMessageA游戏屏蔽
热门文章
- 【二】微信开发中的https
- Java小农养成记第十三天
- 关于硕士研究生延毕的几问几答
- Unity之人脸识别对比(二)获取摄像头图像以及保存
- 卖车只是敲门砖,从“硬件升级”到“主动召回”,李想并不理想
- 冲冠一怒为代码:论程序员与负能量
- 十六进制和BCD码的那些事(终结篇)
- 百度Paddle免费课程——从零开始学视觉Transformer
- 我们不做看客,只做时代的赋能者—FMI2018人工智能与大数据高峰论坛圆满落幕...
- Scratch少儿编程与游戏:狙击黑蝙蝠