-
-
Notifications
You must be signed in to change notification settings - Fork 522
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
REMOTE.require() not working #48
Comments
Command prompt output:
|
This is not an issue with
If you have further questions about Electron itself please feel free to ask in the community or the Slack Channel. |
@MarshallOfSound Hmmm... you are correct. Till now I've used https://github.com/BZCoding/SkelEktron based app (which uses electron-builder, and it doesn't have electron-compile support). As recommended by you, now I m trying electron-forge electron-userland/electron-compile#61 (comment) The same which used to work earlier (with |
When using electron-forge from node_modules within a project remote.require() seems to be relative to the .bin folder under ./node_modules instead of the entry point of the application. Using remote require like this exposes that the main process entry-point isn't being passed to electron from electron-forge correctly:
If electron-forge should be as transparent as possible on top of electron, then it shouldn't directly or indirectly alter the intended functionality of a method described in electrons API docs. https://electron.atom.io/docs/api/remote/#methods
in electron-forges case, the entrypoint is now node_modules/.bin/electron-forge If a user writes
The expected behaviour is that |
feat: Support being offline better
Please describe your issue:
When I
require
some module from renderer process, it is working fine. But if Irequire
and remote module (which is already loaded in main process) from renderer process, exception is seen.Console output when you run
electron-forge
with the environment variableDEBUG=electron-forge:*
. (Instructions on how to do so here. Please include the stack trace if one exists.Command prompt output: Pasted in next comment to keep the actual issue statement tidy.
Browser window console logs:
What command line arguments are you passing?
None specifically.
What does your
config.forge
data inpackage.json
look like?Please provide either a failing minimal testcase (with a link to the code) or detailed steps to
reproduce your problem. Using
electron-forge init
is a good starting point, if that is not thesource of your problem.
bo-login.js code:
Here
REMOTE
is aglobal
property which was set inBrowserWindow.webPreferences.preload
.main.js code:
preload.js code:
The text was updated successfully, but these errors were encountered: