You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 1, 2020. It is now read-only.
I'm trying to load a external module in my electron app, but electron-compiler don't allow it. I'm trying to make a app that uses some kind of plugin system, and it load these plugins from some directory outside of the app.
I tried to add the bypass method but it appear to only work on content loaded by html tags (like script tag) and not with the require() method of javascript.
How do I load these modules outside of my app with 'require' bypassing the compiler?
The text was updated successfully, but these errors were encountered:
I've got an addon that references a 3rd party shared object which I've placed in my /urs/local/lib directory. I link the shared object library in my addon with binding.gyp and build it with node-gyp rebuild.
I reference my module, which is named myPrecompiledModule.node in the rest of my app to use functions and methods inside of the shared library. No problem.
This all works find when I start my project with electron-forge start. I get no errors when packaging the deb package and installing.
But when I run my project from the installed file, I get the message:
A JavaScript error occurred in the main process
Uncaught Exception:
Error: Asked for /usr/lib/myInstalledApp/resources/app.asar/myPrecompiledModule but it was not precompiled!
How can I precompile this already precompiled module when I package it with electron-forge --arch=armv7l make?
Make sure you put your HTML and any static files inside a sub-folder i.e. dist, or src, then point all the files to the correct directory, and recompile, that seems to resolve my issue.
This issue seems to happen, for me, when the HTML file is loaded from the root directory.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I'm trying to load a external module in my electron app, but electron-compiler don't allow it. I'm trying to make a app that uses some kind of plugin system, and it load these plugins from some directory outside of the app.
I tried to add the bypass method but it appear to only work on content loaded by html tags (like script tag) and not with the require() method of javascript.
How do I load these modules outside of my app with 'require' bypassing the compiler?
The text was updated successfully, but these errors were encountered: