-
-
Notifications
You must be signed in to change notification settings - Fork 92
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
Packaged x64 Angular Electron app produces javascript error: Cannot find module 'electron-edge-js' #138
Comments
Did you check packaging sample and associated issues mentioned in redme? |
For those who has problem with "The edge module has not been pre-compiled for Electron version 17.4.8" which is using webpack after publishing with electron-builder. npm i electron-edge-js (the latest). |
@dbuldansjah Hey, just a bit confused. where should we add extraResources? Its not a property in webpack config |
Take a look at Packaging Electron application in README it has examples for different application packagers including Webpack. |
@agracio yep tried that, seems like now it has to be included by a plugin
btw still didnt work for me. Now it tells that "cannot find module electron-edje-js" |
What packager are you using, did you try to use |
Hey sorry for the delay, today i spend about 14hours total looking what i`m doing wrong. I'm using webpack and was trying to connect to .net dll from my angular+electron.js project. So i connected webpack config and applied examples from README file and for some reason it didnt work, but then i decided to run electron-edje-js in forked proccess and it worked (same as the example in README file: created a fork from main.js then applied my code in child.js file). Right now what i can see that module is working but i still cant call for my .net code because of error: "Could not load file or assembly 'System.Runtime, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.". |
Take a look at electron-forge example added today to README, it does not use webpack but should be an easy addon. Main points for electron-forge:
I have updated |
You are absolutely right. I didnt noticed that i put |
AlekseyKurakin, you can put the extraResource inside the package.json as
like this:
"files": [
"build/**/*",
"node_modules/**/*",
"package.json"
],
"extraResources": [
"node_modules/electron-edge-js/**"
],
…On Wed, Sep 18, 2024 at 6:16 PM agracio ***@***.***> wrote:
Could not load file or assembly 'System.Runtime, Version=8.0.0.0,
Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its
dependencies. The system cannot find the file specified. usually means it
is trying to run as .NET Framework instead of .NET Core.
It is probably somehow ignoring process.env.EDGE_USE_CORECLR = 1 or it
was not passed properly
—
Reply to this email directly, view it on GitHub
<#138 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AC5XFT3LKXDPEAMTO37YHA3ZXH3VTAVCNFSM53B4RDBKU5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TEMZVHE2DSOJSHA4Q>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
There was an issue opened here: agracio/electron-edge-js-quick-start#19 that is the reason for electron-forge example. |
I'm able to successfully run an Angular project with electron-edge-js in dev; however, when packaging the app using electron-packager, the application fails to load and produces a JS error stating "Cannot find module 'electron-edge-js'". I've followed the edge-js documentation for setup and usage, with the below snippet's being my initialization (NOTE: this initialization is occurring in the electron main process):
const edge = require('electron-edge-js');
These are the dependencies referenced in the root packages.json file:
"electron": "^17.4.9", "electron-edge-js": "^17.0.0", "electron-packager": "^15.5.1",
Can someone please assist with some info on why this dependency may not be included properly on build? For reference, this is the build command for Windows apps that I've been using:
npm run build --prod && cross-var electron-packager dist/my-app $npm_package_name-$npm_package_version --out=packages --platform=win32 --arch=all --overwrite
EDIT FOR MORE INFO:
I'm also running node version 16.13.1, if that makes any sort of difference.
The text was updated successfully, but these errors were encountered: