debbygigigi / notes

My notes for any technologies of Web, Tech, etc.
9 stars 1 forks source link

dyld: Library not loaded: /usr/local/opt/icu4c/lib/libicui18n.58.dylib 問題 #12

Open debbygigigi opened 5 years ago

debbygigigi commented 5 years ago

昨天因為在用React的環境,隔天上班一如往常準備下 php artisan serve 來開啟專案serve 突然出現error

dyld: Library not loaded: /usr/local/opt/icu4c/lib/libicui18n.58.dylib
Referenced from: /usr/local/bin/node
Reason: image not found 

發現是php不見了, 參考了 這篇 的解決方法 brew reinstall php@7.2 (因為我們公司用7.2) 終於php回來了

後來,要build專案時,又出錯了

ERROR in ./resources/assets/sass/app.scss
Module build failed: ModuleBuildError: Module build failed: Error: Missing binding /Applications/AMPPS/www/sharent/web/node_modules/node-sass/vendor/darwin-x64-67/binding.node
Node Sass could not find a binding for your current environment: OS X 64-bit with Node.js 11.x

原來是因為我npm版本升級後,node-sass 也要安裝到最新版 根據它的指令 npm rebuild node-sass 重裝即可