Creating app with bytenode and electron-packagerSee original GitHub issue
Hi there, I’ve successfully compiled the bytenode version of my server.js file (server.jsc) via electron and I’ve written the entrypoint (main.js) as follows:
const bytenode = require('bytenode'); const v8 = require('v8'); v8.setFlagsFromString('--no-lazy'); require('./server.jsc');
If I try to run
electron ./main.js everything works fine but as I create the package via electron-packager, the program show me the error
Uncaught Error: Invalid or incompatible cached data (cachedDataRejected) at Object.Module._extensions.<computed> [as .jsc]
- Created 3 years ago
- Comments:7 (1 by maintainers)
Top GitHub Comments
For some reasons only putting the absolute path do the job. Anyway, now everything is ok.
The server.js file actually is in resources/app folder. Is it mandatory to add absolute path to it?
I don’t have your exact setup obviously, but it is not mandatory to use an absolute path. No differences between node and bytenode here. Check your setup and make sure that regular node fs functions (and require function) can find your file.
Please check the example and do something similar.