Show Buttons
Share On Facebook
Share On Twitter
Share On Google Plus
Share On Linkdin
Share On Reddit
Share On Stumbleupon
Contact us
Hide Buttons

Resolved — Error: Could not load the bindings file. Tried

I ran into this issue when run­ning start­ing my nodejs app using pm2. For some rea­son, when my app kept on crash­ing. Upon check­ing my pm2 logs, I saw the fol­low­ing error message.

Error: Could not locate the bindings file. Tried:
 /opt/zem-web/node_modules/bcrypt/build/bcrypt_lib.node
 /opt/zem-web/node_modules/bcrypt/build/Debug/bcrypt_lib.node
 /opt/zem-web/node_modules/bcrypt/build/Release/bcrypt_lib.node
 /opt/zem-web/node_modules/bcrypt/out/Debug/bcrypt_lib.node
 /opt/zem-web/node_modules/bcrypt/Debug/bcrypt_lib.node
 /opt/zem-web/node_modules/bcrypt/out/Release/bcrypt_lib.node
 /opt/zem-web/node_modules/bcrypt/Release/bcrypt_lib.node
 /opt/zem-web/node_modules/bcrypt/build/default/bcrypt_lib.node

The fol­low­ing two com­mands helped me resolve it on my Ubuntu setup

sudo npm install -g node-gyp
sudo node-gyp rebuild

You may also like...

  • mais­nam raju

    You have a type there, you have rebuid instead of rebuild

    • tuto­ri­al­hori­zon

      +1 thanks for the catch!