agracio / electron-edge-js

Run .NET and Node.js code in-process on Windows, MacOS, and Linux using Electron
MIT License
354 stars 92 forks source link

Packaged app throws an error "edge.initializeClrFunc is not a function" #168

Open aaarianme opened 5 hours ago

aaarianme commented 5 hours ago

Im packaging my electron app using electron-builder and when I ship this to other devices and run it, i get this error: thumbnail_image The error is in "myapp\dist\win-unpacked\resources\app\node_modules\electron-edge-js\lib\edge.js" file where it returns edge.initializeClrFunc(options)

I have tried building the app with "asar":false and "asar": true and I still get the same problem.

Can anyone help me troubleshoot this?

agracio commented 5 hours ago

Did you take a look at packaging guides Packaging Electron application? electron-edge-js cannot be included in asar pack, you need to exclude it. If you getting the same error with both "asar":false and "asar": true then it is not excluded from asar archive.

EDIT: and make sure that electron-edge-js is excluded from electron-rebuid in case electron builder tries to rebuild any node native modules.