Develop
[React] dyld: Library not loaded: /usr/local/homebrew/opt/icu4c/lib/libicui18n.74.dylib
너드나무
2024. 12. 10. 16:17
반응형
서론
맥북 변경(M1 -> Intel)로 기존 npm 명령어를 사용하면서 발생한 에러를 정리해본다.
dyld: Library not loaded: /usr/local/homebrew/opt/icu4c/lib/libicui18n.74.dylib

에러 내용
- 맥북을 교체하면서 M1에서 사용하던 버전 및 환경을 그대로 복사함
% npm
dyld: Library not loaded: /usr/local/homebrew/opt/icu4c/lib/libicui18n.74.dylib
Referenced from: <1298874D-5488-3F99-998D-443281EE05AF> /usr/local/Homebrew/Cellar/node/22.7.0/bin/node
Reason: tried: '/usr/local/homebrew/opt/icu4c/lib/libicui18n.74.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/usr/local/homebrew/opt/icu4c/lib/libicui18n.74.dylib' (no such file), '/usr/local/homebrew/opt/icu4c/lib/libicui18n.74.dylib' (no such file), '/usr/local/Homebrew/Cellar/icu4c@76/76.1_1/lib/libicui18n.74.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/usr/local/Homebrew/Cellar/icu4c@76/76.1_1/lib/libicui18n.74.dylib' (no such file), '/usr/local/Homebrew/Cellar/icu4c@76/76.1_1/lib/libicui18n.74.dylib' (no such file)
zsh: abort npm
해결방법
- brew upgrade npm
% brew upgrade npm
You have 15 outdated formulae installed.
==> Upgrading 1 outdated package:
npm 22.7.0 -> 23.3.0
...
==> Upgrading npm
22.7.0 -> 23.3.0
==> ./configure --enable-ipv6 --datarootdir=/usr/local/homebrew/Cellar/python@3.13/3.13.1/s
==> make
...
==> Installing node
==> ./configure --without-npm --with-intl=system-icu --shared-libuv --shared-nghttp2 --shar
==> make install
==> node /private/tmp/node-20241210-21345-slq57h/node-v23.3.0/npm_bootstrap/bin/npm-cli.js
==> Downloading https://formulae.brew.sh/api/formula.jws.json
#################################################################################### 100.0%
🍺 /usr/local/homebrew/Cellar/node/23.3.0: 2,676 files, 91.4MB, built in 122 minutes 55 seconds
==> Running `brew cleanup node`...
검증
% npm -v
10.9.0
% npm run start
Compiled successfully!
You can now view brand-insight in the browser.
http://localhost:3000
Note that the development build is not optimized.
To create a production build, use npm run build.
webpack compiled successfully

728x90
반응형