Not working with win10+electron, osx+electron@beta
OSX works, when I use NVM to set the same Node version (since NODE_MODULE_VERSION must match the node verison) as used by electron, but would exit when using electron@beta with the matching node version.
Windows 10 would just exit on setting 1, and show an error on setting 2.
Using the normal node version, it works fine.
Used babel - see the GIST for all files and installation: https://gist.github.com/BananaAcid/6c15120ed62828c7bce42af9977af10e
node module versions: https://nodejs.org/en/download/releases/ used node version by electron: https://electronjs.org/ -> see Releases boxes.
Thanks for the report.
For nwjs or electron you probably need to build every native module with special target. Please compare with this issue: https://github.com/royaltm/node-murmurhash-native/issues/9.
I'm not familiar with electron.
Please consult https://electronjs.org/docs/tutorial/using-native-node-modules.
I'll look into it myself when I'll have more time.
Ok, I really quickly managed to solve the problem following the advice on the page I have given above.
- get your gist
- add some package.json (
npm initand leave all default) - fix
app.mjsby adding missingimport fs from 'fs';at the top of the file npm i electron babel-core babel-preset-electronnpm i electron-rebuild./node_modules/.bin/electron-rebuild√ Rebuild Completenode_modules/electron/dist/electron index.js
app should have started...
fin.
hash 09b8326b of file (...)\app.mjs