問題描述:
遇到一個Vue3的項目,發現需要升級node才能運行,于是升級至v14.15.1
后面運行原項目時,出現報錯:
Module build failed (from ./node_modules/sass-loader/lib/loader.js):
Error: Node Sass does not yet support your current environment: OS X 64-bit with Unsupported runtime (83)
For more information on which environments are supported please see:
https://github.com/sass/node-sass/releases/tag/v4.12.0
Module build failed.jpg
得出結論:
查閱相關資料后得出:運行環境發生改變后,依賴需要重新綁定。
解決方法:
npm rebuild node-sass
npm update
備注:
執行命令后,項目運行正常。
使用yarn upgrade代替npm undate時,依然報錯