npm install 出现的各种问题

执行命令:

npm install

出现grp ERR! configure error、npm ERR! code ELIFECYCLE 、gyp ERR! UNCAUGHT EXCEPTION 、gyp ERR! stack 、gyp ERR! System、gyp ERR! command、gyp ERR! cwd、gyp ERR! node -v、gyp ERR! node-gyp -v 等等安装错误

这里用的是淘宝镜像cnpm指令安装错误
在这里插入图片描述
这里是npm安装错误
在这里插入图片描述

解决方法:

先安装:

npm install --ignore-scripts

或者:(下面不再展示cnpm,需要百度使用淘宝镜像)

cnpm install --ignore-scripts

再安装node-sass :

npm install node-sass@4.14.1

(node-sass@latest为v5.0.0,而sass-loader期望值为^4.0.0,使用会出现Error:Node Sass version 5.0.0 is incompatible with ^4.0.0 错误)

执行命令:

npm run dev

已经成功,不过出现警告:

WARNING in unable to locate ‘* : \ * **\static’ at ’ * : \ *
**\static’

去所在目录创建新的空文件夹static

Ctrl+c退出再执行:

npm run dev

问题解决

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值