記錄一下我出現這種問題的解決方法
在網上搜到的大多是 刪除node_modules 重新安裝 node-sass 在 npm install
或者是 設置 npm config set sass_binary_site=https:
//npm.taobao.org/mirrors/node-sass
這兩種方式都無法成功的npm install
問題定位: 主要是node版本問題無法安裝node-sass
解決:修改node-sass 鏡像源
1,其中修改sass鏡像源會報cb.apply is not function (我這里會吧)
2,然后就刪除了手動刪除了C:\Users\tzw\AppData\Roaming\下的npm 和npm-cache
3,查看自己的node版本和npm 版本 我這里是node= 14.18.1 npm= 6.14.15
4,npm install npm -g 從新安裝npm
5,npm = 8.3.0
6,重新回到項目刪除node_modules 直接npm install ok 成功