简体   繁体   English

尝试运行电子项目时的不同编译版本

[英]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. 我目前正在尝试使用electronic和node-gyp创建C插件的node js项目。 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版本后,程序运行完美。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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