简体   繁体   中英

Different compiling version while trying to run an electron project

I currently an trying to make a node js project using electron and node-gyp for c addons. But when I try to run my program using

electron index.js

I get this error:

A JavaScript error occurred in the main process
Uncaught Exception:
Error: The module '/home/ubspy/Code/Node-c-test/build/Release/addons.node'
was compiled against a different Node.js version using
NODE_MODULE_VERSION 57. This version of Node.js requires
NODE_MODULE_VERSION 54. Please try re-compiling or re-installing
the module (for instance, using `npm rebuild` or`npm install`).
at process.module.(anonymous function) [as dlopen]

I've tried reinstalling all the packages, and recompiling all the source code, I don't know what's wrong.

经过多次试验和反复尝试,我弄清楚了这一点,将电子版升级到模块版本匹配的最新beta版本后,程序运行完美。

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