UglifyJs 壓縮 JavaScript 遇到錯誤 Library not loaded: '/usr/local/opt/icu4c/lib/libicui18n.70.dylib',解決方式使用 Homebrew 更新 icu4c 模組。
/usr/local/bin/uglifyjs data_clean.en.js -o data_clean.en.min.js
dyld[6795]: Library not loaded: '/usr/local/opt/icu4c/lib/libicui18n.70.dylib'
Referenced from: '/usr/local/Cellar/node/18.8.0/bin/node'
Reason: tried: '/usr/local/opt/icu4c/lib/libicui18n.70.dylib' (no such file), '/usr/local/lib/libicui18n.70.dylib' (no such file), '/usr/lib/libicui18n.70.dylib' (no such file), '/usr/local/Cellar/icu4c/71.1/lib/libicui18n.70.dylib' (no such file), '/usr/local/lib/libicui18n.70.dylib' (no such file), '/usr/lib/libicui18n.70.dylib' (no such file)
解決方式
1. 開啟終端機
2. 輸入以下指令
% brew upgrade icu4c
% brew upgrade
% brew cleanup
無效的嘗試
安裝 uglify-js 遇到相同錯誤訊息
% npm install --g uglify-js
留言
張貼留言