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.
- Via NVM make sure you are using proper version of node.js, run
node -v
; - After installing and switching to proper node.js version via
nvm
runnpm update
; - After all packages are updated (or downgraded) to compatible versions, run
npm rebuild
; - Note:
npm rebuild
might throw errors - just runnpm 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).