bcrypt invalid elf header when running node app

I’ve found that bcrypt compiled on OSX will not quite work on Linux. In other words, if you check in the bcrypt compiled on your local OSX workstation, and try to run the node app on your linux servers, you will see the error above.

Solution: npm install bcrypt on Linux, check that in, solved.

Probably the best way to deal with this is exclude your node_modules in .gitignore… and npm install remotely.

Leave a Comment