node.js - dyld[68210]: Library not loaded: opthomebrewopticu4cliblibicui18n.74.dylib when I try to use npm - Stack Overflow

admin2025-04-18  1

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 badge
Add a comment  | 

1 Answer 1

Reset to default 1

What 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

转载请注明原文地址:http://conceptsofalgorithm.com/Algorithm/1744970555a277460.html

最新回复(0)