NodeJS module "userid" Error: module version mismatch. Expected 46, received 47

When trying to start server.js, which requires the "userid" module, the following error appears.

  module.js:460
  return process.dlopen(module, path._makeLong(filename));
                 ^

Error: Module version mismatch. Expected 46, got 47.
    at Error (native)
    at Object.Module._extensions..node (module.js:460:18)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:313:12)
    at Module.require (module.js:366:17)
    at require (module.js:385:17)
    at Object.<anonymous> (/root/backend/node_modules/userid/lib/userid.js:2:15)
    at Module._compile (module.js:435:26)
    at Object.Module._extensions..js (module.js:442:10)
    at Module.load (module.js:356:32)

How can I solve this problem?

+4
source share
2 answers

Not sure about the exact meaning of this error, but my fix for this is to delete the directory node_modulesand reinstall the necessary modules with npm install.

The above solution for this error appears in a node project that uses locally installed modules. If there are any global modules that throw this error, you may need to reinstall them.

+3

, package.json.

+1

Source: https://habr.com/ru/post/1624415/


All Articles