I've successfully built node.js addon, which works well with Node on Windows. Now, I want to create a Windows app using Electron. When loading the module in HTML file, I got the error:
var dbr = require('./build/Release/dbr');
Something wrong with ATOM_SHELL_ASAR.js .
The issue only occurred on Windows. On Linux and Mac, it worked well.
How can I fix it?
Thanks!
您需要为Electron重建您的本机Node插件, 这些步骤在文档中列出 。
I'm using Electron 2 version and have the same error with another module.
I solved this problem by this advise on Electron page: To ensure your native dependencies are always matched electron version , simply add script "postinstall": "electron-builder install-app-deps"
to your package.json
.
And then I changed: "postinstall": "electron-builder install-app-deps && npm run lint:fix"
. Then npm run postinstall
.
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.