question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Creating app with bytenode and electron-packager

See 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]

Any suggestion?

Thank you

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
xmrhahnxcommented, Jul 9, 2020

For some reasons only putting the absolute path do the job. Anyway, now everything is ok.

Thank you!

0reactions
OsamaAbbascommented, Jul 9, 2020

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found