Example for runBytecodeFile not working
See original GitHub issueHi,
I compiled a file test.js with console.log('Hello World!')
inside. Nothing else.
Compilation is done by bytenode -c test.js
Then I use this file (testexe.js) to execute test.jsc
const bytenode = require("bytenode");
bytenode.runBytecodeFile('test.jsc');
I use
node testexe.js
for execution.
I get no ‘Hello World!’
But if I use bytenode test.jsc
it works.
I use node v10.13.0 in WIn10 x64
Any ideas?
Issue Analytics
- State:
- Created 4 years ago
- Comments:6
Top Results From Across the Web
Example for runBytecodeFile not working · Issue #24
Hi, I compiled a file test.js with console.log('Hello World!') inside. Nothing else. Compilation is done by bytenode -c test.js Then I use ...
Read more >How do I protect a commercial app built with Electron?
I believe this topic has nothing to do with the app being built with electron as almost all apps can be reverse-engineered.
Read more >A brand new website interface for an even better experience!
Example for runBytecodeFile not working.
Read more >Top 10 Most Common Node.js Developer Mistakes
In this particular example of a Node.js problem, we are fetching the image from Gravatar, reading it into a Buffer, and then responding...
Read more >Troubleshooting
These are some common issues you may run into while setting up React Native. If you encounter something that is not listed here,...
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
Thank you for your fast response.
You are right, with this flag my simple example works.
But … If I use
--no-module
for my real js files, I get awhen I execute them.
To test this I extended test.js:
const os = require('os');
console.log('Hello World!');
console.log(os.hostname());
As soon as I have a
require
inside the error apears.If you want to use
require
function, don’t use the--no-module
flag. Just compile it as usual. It should work then.