輸入以下兩個命令:
npm uninstall node-sass
npm i -D sass
注:Mac環境如果進行了系統升級,需要重新安裝Xcode,執行命令
xcode-select install
不然會出現如下的錯誤
Mac 解決 gyp: No Xcode or CLT version detected! 報錯
如果出現python2的錯誤
gyp verb `which` failed Error: not found: python2
去官網下載安裝python2.7的包即可;
關聯錯誤:
Node Sass does not yet support your current environment: OS X 64-bit with Unsupported runtime (93)