hi,
version: os->10.13.3 node->v8.4.0 vscode->1.25.1;"bcrypt": "^3.0.0".
if i debug in vscode:
;
if I start the service with node, it works fine.
I tried to change the node version and the bcrypt version,it no works.
Recompile node module with npm rebuild bcrypt.
Also make sure vscode uses the same node as your CLI. Sometimes node
version managers or old vscode config makes this version mismatch.
On Wed 18 Jul, 2018, 9:20 AM webPpei, notifications@github.com wrote:
hi,
version: os->10.13.3 node->v8.4.0 vscode->1.25.1;"bcrypt": "^3.0.0".
if i debug in vscode:
[image: image]
https://user-images.githubusercontent.com/25998977/42858103-803380be-8a7f-11e8-866a-5b55aa85718d.png
;
if I start the service with node, it works fine.
I tried to change the node version and the bcrypt version,it no works.—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/kelektiv/node.bcrypt.js/issues/635, or mute the
thread
https://github.com/notifications/unsubscribe-auth/AQCaT702p8T78TTaq6kRPO4DxcgvX0lYks5uHrCYgaJpZM4VT5uZ
.
thanks,I tried it but it didn't work out.
This Error occur to me. Same problem.
I guess, diffence to node install version and running version.
In my case, installed nodejs 2 version.
nodejs is old version v4.2.6. => npm start execute
node installed v8.11.3 => install version
'Npm start' is call 'nodejs'.
So, I remove old 'nodejs' version and make symbolic link 'nodejs'.
Work to me.
And I think same problem "Module version mismatch error"
My Error message blow
module.js:435
return process.dlopen(module, path._makeLong(filename));
^
Error: Module version mismatch. Expected 46, got 57.
@webPpei I ran into the same issue. Rebuild didn't help. Do make sure your nodejs runtime version in vscode is same as the compiling version.
i had to pass the rebuild flag, otherwise it would use the already installed version.
my issue was solved by doing
npm rebuild bcrypt --build-from-sourcei had to pass the rebuild flag, otherwise it would use the already installed version.
my issue was solved by doing
npm rebuild bcrypt --build-from-source
this works for me!!!
@webPpei I ran into the same issue. Rebuild didn't help. Do make sure your nodejs runtime version in vscode is same as the compiling version.
How
I have the same issue I cannot resolve please give me some ideas
same here. suggestions did not work for me either
For me, I just ran npm install bcrypt again and it worked. I tried the rebuild command and got nowhere.
Any resolutions for this issue? I am using it in Docker.
Got it working after spending hours.
docker-compose down docker-compose builddocker-compose upFor reference my dockerfile is as follows,
FROM node:10.16.0
RUN npm install -g --unsafe-perm [email protected]
RUN mkdir /app
WORKDIR /app
COPY package*.json /app
COPY prisma /app/prisma/
COPY src /app/src
ARG MYSQL_URL
ENV MYSQL_URL "$MYSQL_URL"
RUN npm install
RUN npm audit fix --force
RUN prisma2 generate
CMD ["npm", "start" ]
Got it working after spending hours.
- Stop the images by
docker-compose down- Build the images by
docker-compose build- Start the images by
docker-compose upFor reference my dockerfile is as follows,
FROM node:10.16.0 RUN npm install -g --unsafe-perm [email protected] RUN mkdir /app WORKDIR /app COPY package*.json /app COPY prisma /app/prisma/ COPY src /app/src ARG MYSQL_URL ENV MYSQL_URL "$MYSQL_URL" RUN npm install RUN npm audit fix --force RUN prisma2 generate CMD ["npm", "start" ]
@bamne123 try to add node_modules to your .gitignore file
I just ran the below command and then tried to install and it worked:
npm install node-pre-gyp -g
I have same problem. but I have found the problem is that I have binded the node_modules folder from local machine to container‘s. Bc my local machine is based on Windows, and all files in node_modules folder are compiled by Windows which caused problem to run on container. The solutions is when you creating image install all dependencies to image. Hope this going to help you out.
seeing inside of docker container using docker-compose...blew away node_modules and ran docker-compose up --build...problem no more...
for me, it was working fine but only did this when I tried to put it on Heroku(a hosting website) to fix it I just delete node_modules this will only work if what you host with will auto download your modules
i had to pass the rebuild flag, otherwise it would use the already installed version.
my issue was solved by doing
npm rebuild bcrypt --build-from-sourcethis works for me!!!
I am using yarn. And it says rebuild not found what to do??
Most helpful comment
i had to pass the rebuild flag, otherwise it would use the already installed version.
my issue was solved by doing
npm rebuild bcrypt --build-from-source