简体   繁体   中英

Fix Node.js version problem “ Please try re-compiling or re-installing”

I've already tried wiping my node_modules and reinstalling, running npm rebuild multiple times, changing Node versions and npm rebuild my_module_name --update-binary. Nothing works.

EDIT: This package was previously installed and working. The package link is compatible with Windows. It just stopped working after a while of not running the script. I tried to follow what the page says and make sure I have the latest version of the Microsoft Visual C++ Redistributable installed. I'm still getting the same error.

Error: The module './././**PATH**\node_modules\@nut-tree\nut-js\node_modules\opencv4nodejs-prebuilt\build\Release\opencv4nodejs.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 79. This version of Node.js requires
NODE_MODULE_VERSION 93. Please try re-compiling or re-installing
the module (for instance, using `npm rebuild` or `npm install`)

This would suggest that you are either using a Node version manager or recently updated your Node version and there is a mismatch between the compiled versions of your packages and your current Node version. If you are using a Node version manager, double-check that you are using the right version of Node. Otherwise, all you need to do is delete your project's node_modules folder and then run npm install .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM