Fixing Node Library Not Loaded icu4c Error

Recently I sat down at my mac to start working on one of my React apps and when I tried to run yarn start I got the following error:

dyld: Library not loaded: /usr/local/opt/icu4c/lib/libicui18n.61.dylib
Referenced from: /usr/local/opt/node@8/bin/node
Reason: image not found
Abort trap: 6

The error message mentioned node so I tried to run node -v and got the same error so I knew I'd narrowed the problem down to node and some dependency named icu4c. As with most computer-related issues, I figured a re-install might be the quickest path to fixing things, and sure enough it did:

brew uninstall --ignore-dependencies node
brew install node

Notice I included the --ignore-dependencies flag on the uninstall because yarn depends on node and brew won't let me uninstall without passing that flag. It's not a problem though since I'm installing node again on the next line.

And now I can yarn start my react project and get back to development.

Hopefully you found this post helpful, if you have any questions you can find me on Twitter.

Avoiding Git Problems When Installing a Theme to Hugo
Handling Keyboard Shortcuts in React