bcrpyt error when deploying to poly
scott-riley opened this issue · 3 comments
Setting up a new polybit project and deploying gives the following error when I try to access the API server:
Application Error: /var/task/node_modules/bcrypt/build/Release/bcrypt_lib.node: invalid ELF header
Followed the deployment instructions:
nodal poly:new project-name
nodal poly:compile project-name
Poly reports a success back on the CLI but accessing the server throws the above error.
Cheers!
~ Scott
Uninstall bcrypt
and install bcryptjs
. Replace require('bcrypt')
with require('bcryptjs')
in your User model.
Should fix the problem. Polybit deploy / compile doesn't currently have an npm install
step, meaning it's going to copy natively from your installed node_modules. Native JS modules only. It won't be this way forever, but for now the quick fix is what I've mentioned. :)
Ahh cool, I’ll give this a try today and post back results!
Everything cool? Mind if I close this?