npm ERR! gyp ERR

npm ERR! gyp ERR! stack at callback (C:\0_RG\Code\rg3-cli\node_modules\graceful-fs\polyfills.js:299:20)
npm ERR! gyp ERR! stack at FSReqCallback.oncomplete (fs.js:149:21)
npm ERR! gyp ERR! System Windows_NT 10.0.19042
npm ERR! gyp ERR! command “C:\\Program Files\\nodejs\\node.exe” “C:\\0_RG\\Code\\rg3-cli\\node_modules\\node-gyp\\bin\\node-gyp.js” “rebuild”
npm ERR! gyp ERR! cwd C:\0_RG\Code\rg3-cli\node_modules\fibers
npm ERR! gyp ERR! node -v v12.3.0
npm ERR! gyp ERR! node-gyp -v v3.8.0
npm ERR! gyp ERR! not ok

解决方法:

先安装

npm install --ignore-scripts

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

cnpm install --ignore-scripts

再安装node-sass(版本号根据实际情况,如果没用到,可以不用安装)

npm install node-sass@4.14.1
npm install sass@1.33.0
npm install sass-loader@7.1.0
文档更新时间: 2023-02-21 19:15   作者:admin