I'm posting this here as it's clearly a server configuration issue rather than a code issue.
I've got an application working on my local Windows PC, however when trying to run:
npm install bcrypt
on an AWS EC2 server (RHEL), I get the following error:
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! bcrypt@1.0.2 install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the bcrypt@1.0.2 install script 'node-pre-gyp install --fallback-to-build'.
There do appear to be a number of posts about bcrypt node module not working in certain environments, but none appear to be on a RHEL EC2 box, except one which told me to run the following (which didn't work):
sudo yum install nodejs npm --enablerepo=epel
sudo yum groupinstall "Development tools"