Error: Module did not self-register.

14,932

This problem happens mostly because you copied/cloned the repository from somewhere else, but some modules for nodeJS should be installed/registered locally on your machine, during which the happens the build process(maybe some native language like C).

and be noted that the node_modules folder should not be staged for versioning. and should be ignored by versioning tool. and the one who is trying to clone this package should build / install firstly.

I find the answer to this problem. But plz don't devoted this just because you want. I upgrade the NPM using

npm install npm -g.

after that, delete the node_modules folder, then,

npm install

Everything will be good.

Share:
14,932
cinqS
Author by

cinqS

I won't write anything here because I don't want to expose anything to public and you should be aware that the attempt of trying to know something of the others is highly not appreciated.

Updated on June 15, 2022

Comments

  • cinqS
    cinqS almost 2 years

    Server: Ubuntu server 14.04

    Node: v4.2.6 LTS

    npm: 1.3.10

    I pullled my colleage's work from git remote. He made the node_modules as .gitignore. So I have to npm install the modules.

    But after a successful install of npm. when I try to start the project using mocha. It remind me of a module didn't self-register

    The error comes from the module of Bcrypt.

    at bindings (/base_dir/node_modules/bcrypt/node_modules/bindings/bindings.js:76:44)

    I don't want to downgrade my node to 0.10, because, I can't use JS promise in that version. Somehow, JS promise is a must in my work

  • StevenSiebert
    StevenSiebert over 2 years
    This does not really answer the question. If you have a different question, you can ask it by clicking Ask Question. To get notified when this question gets new answers, you can follow this question. Once you have enough reputation, you can also add a bounty to draw more attention to this question.