vue项目 npm install时node-sass报错

 首先:如果网络比较慢也有可能引起下载失败 

npm install --registry=https://registry.npm.taobao.org

其次:检查node版本号,可以通过nvm切换相应的版本号

 可以根据具体的情况安装 node-sass版本号

npm install node-sass@^4.14.0 --registry=https://registry.npm.taobao.org
 最后一次搜索是搜索的node-sass错误:
npm ERR! node-sass@4.11.0 postinstall: `node scripts/build.js`
可执行:
//设置全局镜像源:
npm config set sass_binary_site https://npm.taobao.org/mirrors/node-sass/
然后 npm install
 

 

posted @ 2024-01-16 09:20  IT小姐姐  阅读(25)  评论(0编辑  收藏  举报