0

when i run command npm start, i am getting this error

Error: The module '/var/www/oxygen/mirari-api/node_modules/bcrypt/lib/binding/bcrypt_lib.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 59. This version of Node.js requires
NODE_MODULE_VERSION 64. Please try re-compiling or re-installing

can anyone please help me how to resolve this issue ? i am using node version 10.13.0, i tried a lot googling but it didn't help me yet, if anyone have face that issue then please let me know, thanks

Nikul Panchal
  • 1,542
  • 3
  • 35
  • 58

2 Answers2

0

This error happens when you install your npm modules with different version and then try to run you code it with another version. Try deleting your node_modules folder and reinstalling them.

0

have you tried re-installing it? There is a simillar question here:

Node - was compiled against a different Node.js version using NODE_MODULE_VERSION 51

Resuming, you could try:

$ rm -rf node_modules/bcrypt
$ npm install
// or
$ yarn

Or:

1- Require all dependencies you need in the main.js file that is run by electron. (this seemed to be the first important part for me)

2- Run npm i -D electron-rebuild to add the electron-rebuild package

3- Remove the node-modules folder, as well as the packages-lock.json file.

4- Run npm i to install all modules.

5- Run ./node_modules/.bin/electron-rebuild (.\node_modules.bin\electron-rebuild.cmd for Windows) to rebuild everything