dyld: lazy symbol binding failed: Symbol not found: _node_module_register

Try deleting your node_modules folder and running npm install again.

rm -rf node_modules/
npm install

That should fix it.


Basically this error means - some binary packages was built under different node.js versions and not compatible to each other.

  1. Via NVM make sure you are using proper version of node.js, run node -v;
  2. After installing and switching to proper node.js version via nvm run npm update;
  3. After all packages are updated (or downgraded) to compatible versions, run npm rebuild;
  4. Note: npm rebuild might throw errors - just run npm rebuild again and again until it runs successfully.

Note: some commands may ask for root (sudo) permissions, - it depends from how you have installed packages, npm and node itself previously. nvm - never needs to be run as root (sudo).

Tags:

Node.Js

Npm