How do I fix this nicholas@npc site % http-server dyld[63275]: Library not loaded: /opt/homebrew/opt/icu4c/lib/libicui18n.73.dylib Referenced from: <758FD1B7-1836-321E-A1D9-E47EC3C39702> /opt/homebrew/Cellar/node/21.5.0/bin/node Reason: tried: '/opt/homebrew/opt/icu4c/lib/libicui18n.73.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/opt/homebrew/opt/icu4c/lib/libicui18n.73.dylib' (no such file), '/opt/homebrew/opt/icu4c/lib/libicui18n.73.dylib' (no such file), '/opt/homebrew/Cellar/icu4c/74.2/lib/libicui18n.73.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/opt/homebrew/Cellar/icu4c/74.2/lib/libicui18n.73.dylib' (no such file), '/opt/homebrew/Cellar/icu4c/74.2/lib/libicui18n.73.dylib' (no such file)
How do I fix this nicholas@npc site % http-server dyld[63275]: Library not loaded: /opt/homebrew/opt/icu4c/lib/libicui18n.73.dylib Referenced from: <758FD1B7-1836-321E-A1D9-E47EC3C39702> /opt/homebrew/Cellar/node/21.5.0/bin/node Reason: tried: '/opt/homebrew/opt/icu4c/lib/libicui18n.73.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/opt/homebrew/opt/icu4c/lib/libicui18n.73.dylib' (no such file), '/opt/homebrew/opt/icu4c/lib/libicui18n.73.dylib' (no such file), '/opt/homebrew/Cellar/icu4c/74.2/lib/libicui18n.73.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/opt/homebrew/Cellar/icu4c/74.2/lib/libicui18n.73.dylib' (no such file), '/opt/homebrew/Cellar/icu4c/74.2/lib/libicui18n.73.dylib' (no such file)
This error means that Node.js (or a binary it’s using) is looking for an older version of the ICU library (libicui18n.73.dylib) that isn’t present on your system. This can happen when Homebrew upgrades the icu4c package (e.g., from version 73 to version 74) while Node.js is still built or linked against the older version. Here are a few ways to fix it: 1. Reinstall or Upgrade Node.js: • Since your Node binary now points to the outdated ICU library, reinstalling Node.js should rebuild its links against the current version of icu4c. • Run: brew reinstall node • You might also update Homebrew packages with: brew update && brew upgrade 2. Reinstall or Relink icu4c: • If the problem persists, try reinstalling icu4c so that its symlinks are correctly updated: brew reinstall icu4c • You can also force Homebrew to relink it: brew unlink icu4c && brew link icu4c 3. Create a Symlink (Temporary Workaround): • If for some reason reinstalling doesn’t help or you need a quick fix, you can create a symlink from the version you have (e.g. libicui18n.74.dylib) to the name expected (libicui18n.73.dylib). For example, if you have version 74.2 installed: sudo ln -s /opt/homebrew/Cellar/icu4c/74.2/lib/libicui18n.74.dylib /opt/homebrew/opt/icu4c/lib/libicui18n.73.dylib • Note that this workaround is less ideal because it can hide version mismatches and may break in future updates. After trying one of these solutions, run your command again (http-server) to verify that the error is gone. Typically, the first method (reinstalling Node.js) is the cleanest solution since it ensures that Node and its dependencies are consistent with your current Homebrew-installed libraries.
Testing if the previous output contains the string brew reinstall node
: True
How do I fix this nicholas@npc site % http-server dyld[63275]: Library not loaded: /opt/homebrew/opt/icu4c/lib/libicui18n.73.dylib Referenced from: <758FD1B7-1836-321E-A1D9-E47EC3C39702> /opt/homebrew/Cellar/node/21.5.0/bin/node Reason: tried: '/opt/homebrew/opt/icu4c/lib/libicui18n.73.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/opt/homebrew/opt/icu4c/lib/libicui18n.73.dylib' (no such file), '/opt/homebrew/opt/icu4c/lib/libicui18n.73.dylib' (no such file), '/opt/homebrew/Cellar/icu4c/74.2/lib/libicui18n.73.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/opt/homebrew/Cellar/icu4c/74.2/lib/libicui18n.73.dylib' (no such file), '/opt/homebrew/Cellar/icu4c/74.2/lib/libicui18n.73.dylib' (no such file)
How do I fix this nicholas@npc site % http-server dyld[63275]: Library not loaded: /opt/homebrew/opt/icu4c/lib/libicui18n.73.dylib Referenced from: <758FD1B7-1836-321E-A1D9-E47EC3C39702> /opt/homebrew/Cellar/node/21.5.0/bin/node Reason: tried: '/opt/homebrew/opt/icu4c/lib/libicui18n.73.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/opt/homebrew/opt/icu4c/lib/libicui18n.73.dylib' (no such file), '/opt/homebrew/opt/icu4c/lib/libicui18n.73.dylib' (no such file), '/opt/homebrew/Cellar/icu4c/74.2/lib/libicui18n.73.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/opt/homebrew/Cellar/icu4c/74.2/lib/libicui18n.73.dylib' (no such file), '/opt/homebrew/Cellar/icu4c/74.2/lib/libicui18n.73.dylib' (no such file)
This error means that your Node binary was built against an older version of the ICU library (version 73), but Homebrew now has a newer version installed (for example, version 74). To fix this, you have a few options: 1. Upgrade or reinstall Node so that it links to the current ICU version:  a. Update Homebrew and upgrade packages:   • Run: brew update   • Then: brew upgrade  b. Reinstall Node:   • Run: brew reinstall node  This ensures that Node is rebuilt (or re-linked) against your current icu4c version. 2. Alternatively, if you prefer a quick (but less ideal) workaround, you can create a symbolic link from the existing ICU library to the version Node is looking for. For example, if your installed ICU is version 74 and you have files like libicui18n.74.dylib, you can do:   • cd /opt/homebrew/opt/icu4c/lib   • ln -s libicui18n.74.dylib libicui18n.73.dylib  Keep in mind that manually linking different versions may lead to unexpected behavior if there are incompatibilities. The recommended method is the first one. Reinstalling Node via Homebrew generally takes care of the linkage issues automatically. After doing one of these fixes, try running http-server again.
Testing if the previous output contains the string brew reinstall node
: True