My Node Dockfile
:
# Set the base image to ubuntu
FROM ubuntu
# Define working directory
ADD . /src
WORKDIR /src
# Install Node.js & other
There is a simple way that allowed me to solve this problem, I think this can helps you also in Docker, just add to the run instructions on you docker file this instructions
1. Uninstall bcrypt
npm uninstall bcrypt
2.- Install bcrypt again
npm i bcrypt
Edit this part of your docker file adding the lines
ADD package.json /src/package.json
RUN cd /src && npm install
#Solve the problem reinstaling bcrypt
RUN npm uninstall bcrypt
RUN npm i bcrypt
# Expose port
EXPOSE 8080
The error occurs because when you install bcypt, npm installs the recommended version for your machine and operating system, but when you are on another machine, this doesn't work.