执行命令:
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
问题解决