I have installed 3 different versions of node, and when I try to initialise a new project using npm create ..., I encountered this error:
dyld\[68210\]: Library not loaded: /opt/homebrew/opt/icu4c/lib/libicui18n.74.dylib
Referenced from: \<24066746-1ED4-3611-A914-272C96B743A8\> /opt/homebrew/Cellar/node@16/16.20.2_1/bin/node
Reason: tried: '/opt/homebrew/opt/icu4c/lib/libicui18n.74.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/opt/homebrew/opt/icu4c/lib/libicui18n.74.dylib' (no such file), '/opt/homebrew/opt/icu4c/lib/libicui18n.74.dylib' (no such file), '/opt/homebrew/Cellar/icu4c@76/76.1_1/lib/libicui18n.74.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/opt/homebrew/Cellar/icu4c@76/76.1_1/lib/libicui18n.74.dylib' (no such file), '/opt/homebrew/Cellar/icu4c@76/76.1_1/lib/libicui18n.74.dylib' (no such file)
And then I decided to check which version of node was linked, and ran
node --version
which again returned:
dyld[71989]: Library not loaded: /opt/homebrew/opt/icu4c/lib/libicui18n.74.dylib
Referenced from: <24066746-1ED4-3611-A914-272C96B743A8> /opt/homebrew/Cellar/node@16/16.20.2_1/bin/node
Reason: tried: '/opt/homebrew/opt/icu4c/lib/libicui18n.74.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/opt/homebrew/opt/icu4c/lib/libicui18n.74.dylib' (no such file), '/opt/homebrew/opt/icu4c/lib/libicui18n.74.dylib' (no such file), '/opt/homebrew/Cellar/icu4c@76/76.1_1/lib/libicui18n.74.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/opt/homebrew/Cellar/icu4c@76/76.1_1/lib/libicui18n.74.dylib' (no such file), '/opt/homebrew/Cellar/icu4c@76/76.1_1/lib/libicui18n.74.dylib' (no such file)
tl;dr: I tried initializing a new project using npm create but encountered an unexpected error, which further led me to encountering the same error when I was investigating my node version
I have installed 3 different versions of node, and when I try to initialise a new project using npm create ..., I encountered this error:
dyld\[68210\]: Library not loaded: /opt/homebrew/opt/icu4c/lib/libicui18n.74.dylib
Referenced from: \<24066746-1ED4-3611-A914-272C96B743A8\> /opt/homebrew/Cellar/node@16/16.20.2_1/bin/node
Reason: tried: '/opt/homebrew/opt/icu4c/lib/libicui18n.74.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/opt/homebrew/opt/icu4c/lib/libicui18n.74.dylib' (no such file), '/opt/homebrew/opt/icu4c/lib/libicui18n.74.dylib' (no such file), '/opt/homebrew/Cellar/icu4c@76/76.1_1/lib/libicui18n.74.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/opt/homebrew/Cellar/icu4c@76/76.1_1/lib/libicui18n.74.dylib' (no such file), '/opt/homebrew/Cellar/icu4c@76/76.1_1/lib/libicui18n.74.dylib' (no such file)
And then I decided to check which version of node was linked, and ran
node --version
which again returned:
dyld[71989]: Library not loaded: /opt/homebrew/opt/icu4c/lib/libicui18n.74.dylib
Referenced from: <24066746-1ED4-3611-A914-272C96B743A8> /opt/homebrew/Cellar/node@16/16.20.2_1/bin/node
Reason: tried: '/opt/homebrew/opt/icu4c/lib/libicui18n.74.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/opt/homebrew/opt/icu4c/lib/libicui18n.74.dylib' (no such file), '/opt/homebrew/opt/icu4c/lib/libicui18n.74.dylib' (no such file), '/opt/homebrew/Cellar/icu4c@76/76.1_1/lib/libicui18n.74.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/opt/homebrew/Cellar/icu4c@76/76.1_1/lib/libicui18n.74.dylib' (no such file), '/opt/homebrew/Cellar/icu4c@76/76.1_1/lib/libicui18n.74.dylib' (no such file)
tl;dr: I tried initializing a new project using npm create but encountered an unexpected error, which further led me to encountering the same error when I was investigating my node version
Share Improve this question asked Mar 6 at 14:12 reynareyna 111 bronze badge1 Answer
Reset to default 1What worked for me:
brew update
brew upgrade icu4c
brew link --force icu4c
brew reinstall node
After this, both my node --version
and npm create
commands worked as expected
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744970554a4603939.html
评论列表(0条)