-
Notifications
You must be signed in to change notification settings - Fork 158
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Not building in electron #205
Comments
We have to wait for Electron to update to nodejs v14.x before isolated-vm will (maybe) be compatible. That's expected some time in November. |
Can I use an old version of isolated-vm and electron for the time being? |
I understand electron 2.0.x may work with isolated-vm 1.x, see #132. If you go down that route be sure you're reading the documentation for v1 https://github.com/laverdet/isolated-vm/tree/v1 |
Does the node 14 branch of electron work? Or is that still in development...? Old electron doesn't have some of the APIs that I need. |
It might work. I contributed nodejs/node@c712fb7 with the intention of making isolated-vm more interoperable with Electron and nodejs. This change was picked up in nodejs v14 so once that's in Electron theoretically isolated-vm will work. Even with this you would need to fork a new process with My suggestion is to invoke const { fork } = require('child_process');
const proc = fork('/path/to/node', ['entry.js'], {
stdio: ['pipe', 'pipe', 'pipe', 'ipc']
});
proc.send('hello');
proc.on('message', message => console.log(message)); You could then communicate with the subprocess using the standard nodejs message passing API. This subprocess would be allowed to use isolated-vm. |
Also I tried to build the nodejs-v14 branch of Electron using the instructions they provided and ran into some errors halfway through the build. I'm sure that rabbit hole runs deep so I stopped there. |
Thank you for the info! |
It's an environment variable that runs the process with node as the "platform" instead of Chromium. It gets set automatically in the child process when you run |
Can confirm that Electron 11 beta works with isolated vm! 🎉 |
That's surprising because electron v11.x corresponds to nodejs v12.x which wouldn't have the required platform changes. Could you take a look again and confirm that this is working as expected? I actually was able to get isolated-vm working on electron-nightly with some minor modifications so it does look like we have a path forward very soon. |
Hi!
I'm trying to make a 3D game in javascript, and I'm currently using Three.js and Electron. I was trying to use this with electron, and it installs properly, however when I go into the devtools, it says
and when I try to build it using the electron version, it spits out a bunch of errors. I have tried the electron branch too, with no avail (it's old so i didn't really expect it to work anyway lol)
Thanks!
The text was updated successfully, but these errors were encountered: