Creating app with bytenode and electron-packager
See original GitHub issueHi 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]
Any suggestion?
Thank you
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (1 by maintainers)
Top Results From Across the Web
Creating app using webpack, electron and bytenode #44
Hi, I am trying to create a app using webpack and electron. My end goal is to hide the sources for my application....
Read more >Electron packager tutorial
In this electron packager tutorial we will look at how to create MacOS, Windows and Linux executables with an app icon.
Read more >Electron-packager: cannot find module
Two things you can try: Make sure every node modules that you need to run on production build added into dependencies in package.json....
Read more >electron-packager
Electron Packager is a command line tool and Node.js library that bundles Electron-based application source code with a renamed Electron executable and ...
Read more >bytenode
bytenode -c server.js app.js $ bytenode -c src/*.js compile all `.js` ... bytenode -c *.js -l %.load.js create `filename.load.js` loader ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
For some reasons only putting the absolute path do the job. Anyway, now everything is ok.
Thank you!
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.