2

I am running a node application on terminal and getting error:

Error: The module '\\?\C:\Users\zMaChaoz\Documents\New folder\DoAnWeb\node_modules\bcrypt\lib\binding\bcrypt_lib.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 64. This version of Node.js requires
NODE_MODULE_VERSION 72. Please try re-compiling or re-installing
the module (for instance, using `npm rebuild` or `npm install`).
    at Object.Module._extensions..node (internal/modules/cjs/loader.js:800:18)
    at Module.load (internal/modules/cjs/loader.js:628:32)
    at Function.Module._load (internal/modules/cjs/loader.js:555:12)
    at Module.require (internal/modules/cjs/loader.js:666:19)
    at require (internal/modules/cjs/helpers.js:16:16)
    at Object.<anonymous> (C:\Users\zMaChaoz\Documents\New folder\DoAnWeb\node_modules\bcrypt\bcrypt.js:6:16)
    at Module._compile (internal/modules/cjs/loader.js:759:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:770:10)
    at Module.load (internal/modules/cjs/loader.js:628:32)
    at Function.Module._load (internal/modules/cjs/loader.js:555:12)

Any idea how to solve this?

Nhất Hàn
  • 31
  • 1
  • 5
  • 1
    Possible duplicate of [Node - was compiled against a different Node.js version using NODE\_MODULE\_VERSION 51](https://stackoverflow.com/questions/46384591/node-was-compiled-against-a-different-node-js-version-using-node-module-versio) – shaochuancs Jun 10 '19 at 14:52

2 Answers2

0

Have you tried npm rebuild ? sometimes you'll have to rebuild specific modules e.g : npm rebuild node-sass

-1

run this command npm@latest -g

Brad Ball
  • 599
  • 3
  • 5