我試圖安裝this Electron project。它使用兩個package.json結構,併爲Electron 1.7.2編寫。所有的依賴關係安裝正常,setup instructions包括運行電子重建,也運行沒有抱怨。然而,當我運行npm run dev
一個空的窗口打開,下面是在控制檯:Electron項目的本地節點模塊針對Linux上錯誤版本的Node.js進行編譯
Uncaught Error: The module '[...]/sciencefair/app/node_modules/webworker-threads/build/Release/WebWorkerThreads.node' was compiled against a different Node.js version using NODE_MODULE_VERSION 51. 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] (ELECTRON_ASAR.js:173:20) at Object.Module._extensions..node (module.js:598:18) at Object.module.(anonymous function) [as .node] (ELECTRON_ASAR.js:173:20) at Module.load (module.js:488:32) at tryModuleLoad (module.js:447:12) at Function.Module._load (module.js:439:3) at Module.require (module.js:498:17) at require (internal/module.js:20:19) at bindings (/[...]/sciencefair/app/node_modules/bindings/bindings.js:76:44) at Object.<anonymous> (/[...]/sciencefair/app/node_modules/webworker-threads/index.js:1:198)
我試過安裝Node.js的完全相同的版本1.7.2電子靶向是(7.9。 0),但我得到同樣的東西,有和沒有運行electron-rebuild
。
我是一個網絡人,並沒有真正的電子經驗。操作系統:Ubuntu 16.04 LTS