npm install发现报错,于是打开日志
参考:
Failed at the node-sass@4.14.1 postinstall script.(第二次入坑)_我是你失散多年的总攻的博客-CSDN博客
1、先执行 npm uninstall node-sass
卸载之前可能遗留的node-sass。
2、再执行 npm i node-sass --sass_binary_site=https://npm.taobao.org/mirrors/node-sass/
3、再执行npm install 安装成功
一、其它参考:
参考博客:
前端开发环境搭建踩坑笔记——npm install node-sass安装失败的解决方案 - 知乎
另一台电脑的node版本时 v12.18.3
npm install node-sass@^4.12.0 --registry=https://registry.npm.taobao.org --sass_binary_site=https://npm.taobao.org/mirrors/node-sass/
二、配置镜像源
npm install时失败,报错
reason: connect ETIMEDOUT 104.16.20.35:443
...
'proxy' config is set properly. See: 'npm help config'
参考博客:https://blog.csdn.net/zz00008888/article/details/127852233
配置镜像源
npm config set registry http://registry.npm.taobao.org/