I got an error while using npm or yarn which is based on node js.
dyld: Library not loaded: /usr/local/opt/icu4c/lib/libicui18n.58.dylib
Referenced from: /usr/local/bin/node
Reason: image not found
Reinstall node js
I got an error while using constants inside my node js app. Here is the solution:
SyntaxError: Block-scoped declarations:
SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode
node –use_strict [to-be-replaced].js
Update your node version (node -v) to the current version or above 7.4
sudo npm install -g npm
sudo npm install -g n
sudo n stable
That still wasn’t changing the version of Node that was being used. I finally found that you have change the /usr/bin/node symlink like this:
sudo ln -sf /usr/local/n/versions/node/<VERSION>/bin/node /usr/bin/node
(Use whatever the highest version is in place of „<VERSION>“ from your install options in /usr/local/n/versions/node.