Elastic Beanstalk deployment failure, permission denied, mkdir

For anyone using bcrypt library in your project.

You will get this error if you are trying to deploy your code using Elastic Beanstalk .

Just remove bcrypt and start using bycryptjs

Banged my head for 2 weeks on this .

Also downgrading bcrypt to 3.0.0 won't help you with this.


In my case the solution with .ebextensions/00_dir_permission.config didn't work (still gave me the error), but the solution with using unsafe-perm=true in the .npmrc file did. See https://stackoverflow.com/a/46001517/769726

PS: Running on Node.js version: 8.11.4 on 64bit Amazon Linux/4.5.4