I'm trying to install node with homebrew on macOS Sierra. I run
brew install node
After a seemingly successful install I get the following when trying to run node
:
dyld: Library not loaded: /usr/local/opt/icu4c/lib/libicui18n.58.dylib Referenced from: /usr/local/bin/node Reason: image not found Abort trap: 6
Use Homebrew to install Node. js on MacOS. Homebrew is a better way to manage various packages on your Mac.
To write and run a NodeJS program on mac, first download and install the LTS version of NodeJS from its official website. After installation, create a new JavaScript(. js) file, write some code inside it, and run the “node fileName. js” command in the terminal.
You should have some familiarity with the Mac Terminal application since you'll need to use it to install and test Node and NPM. You'll also need the Terminal to use Node. js and NPM. The Terminal application is located in the Utilities folder in the Applications folder.
This is the series of incantations that eventually worked for me based on this link suggested by @robertklep and @vovkasm.
brew uninstall --force node brew uninstall icu4c && brew install icu4c brew unlink icu4c && brew link icu4c --force brew install node
I'm not sure if they're all needed, but given that I can't get my machine in the previous state... I'll just leave this info here, maybe it'll be useful for somebody else.
In my case, brew upgrade node
resolve the problem :)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With