当我尝试在电子外壳中启动我的应用程序时,出现以下错误:我正在使用节点 v0.12.3 我已经安装了电子预建
Uncaught Exception:
Error: Module version mismatch. Expected 43, got 14.
at Error (native)
at Object.module.(anonymous function) (ATOM_SHELL_ASAR.js:118:20)
at Object.module.(anonymous function) [as .node] (ATOM_SHELL_ASAR.js:118:20)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:298:12)
at Module.require (module.js:353:17)
at require (module.js:372:17)
at bindings (/src/git/superqa/node_modules/bcrypt/node_modules/bindings/bindings.js:76:44)
at Object.<anonymous> (/src/git/superqa/node_modules/bcrypt/bcrypt.js:3:35)
at Module._compile (module.js:418:26)
//my main.js file
看起来像这样superqa/main.js
var app = require("./app/app.js");
var App = require("./src/app.js");
new App(app);
//my src/app.js
看起来像这样superqa/src/app.js
var path = require("path");
var BrowserWindow = require('browser-window');
module.exports = App;
function App(app) {
var self = this;
this._app = app;
this._assetDir = path.resolve(__dirname, "..", "dist");
this.mainWindow = null;
app.on('ready', function() {
self.mainWindow = new BrowserWindow({
width: 1024,
height: 768
});
self.mainWindow.loadUrl("http://localhost:3000/login");
});
}