A
A
Adik Izat2019-11-02 16:24:55
Node.js
Adik Izat, 2019-11-02 16:24:55

How to fix error with NODE_MODULES_VERSION?

Good day, forum users! I hope you can give me an answer or point me in the right direction!

Uncaught Error: The module '\\?\C:\Users\adeke\Desktop\comExe\node_modules\@serialport\bindings\build\Release\bindings.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 72. This version of Node.js requires
NODE_MODULE_VERSION 75. Please try re-compiling or re-installing
the module (for instance, using `npm rebuild` or `npm install`).
    at process.func (electron/js2c/asar.js:138)
    at process.func [as dlopen] (electron/js2c/asar.js:138)
    at Object.Module._extensions..node (internal/modules/cjs/loader.js:922)
    at Object.func (electron/js2c/asar.js:138)
    at Object.func [as .node] (electron/js2c/asar.js:138)
    at Module.load (internal/modules/cjs/loader.js:735)
    at Module._load (internal/modules/cjs/loader.js:648)
    at Module._load (electron/js2c/asar.js:715)
    at Function.Module._load (electron/js2c/asar.js:715)
    at Module.require (internal/modules/cjs/loader.js:775)

Here is such a mistake. The "electron-rebuild" library didn't help(( Node version
: v12.12.0 Serialport
package version: ^8.0.5
Electron package version: ^7.0.1
"electron-rebuild": "^1.8.6"
Tried:
.\node_modules\.bin\electron-rebuild.cmd
npm rebuild serialport --update-binary

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vitaly, 2019-11-06
@vshvydky

visually, you first installed the package for one version of the node, then you updated the node and did not rebuild the binary
, the path is simple, npm i
after that, rebuild everything and should take off
if not, check the node version requirements for your packages.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question