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

后端 未结 5 1420
时光说笑
时光说笑 2020-12-05 08:02

I have tried reinstalling and rebuilding npm, but the problem still persists.

Initially, the problem is with the module mongodb: I don\'t have that pac

相关标签:
5条回答
  • 2020-12-05 08:38

    This is what worked for me:

    rm -rf node_modules/
    sudo npm install
    
    0 讨论(0)
  • 2020-12-05 08:40

    If you just updated node and are running scripts via WebStorm, make sure you edit your Run/Debug Configurations and update the path to the Node Interpreter. I was using the node in

    /usr/local/bin/node
    

    , but after installing Node 4 using nvm, I need to use

    /path/to/.nvm/v4.2.2/bin/node
    
    0 讨论(0)
  • 2020-12-05 08:41

    Try deleting your node_modules folder and running npm install again.

    rm -rf node_modules/
    npm install
    

    That should fix it.

    0 讨论(0)
  • 2020-12-05 08:49

    Make sure your nvm is pointing to the correct nodejs version. For me I used different (higher) while installing the npm modules. So just ran **nvm use** v14.7.0

    0 讨论(0)
  • 2020-12-05 08:56

    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).

    0 讨论(0)
提交回复
热议问题