Skip to content
This repository has been archived by the owner on Jan 15, 2021. It is now read-only.

Unloading of native modules during electron app update #24

Closed
consense opened this issue Nov 23, 2016 · 1 comment
Closed

Unloading of native modules during electron app update #24

consense opened this issue Nov 23, 2016 · 1 comment

Comments

@consense
Copy link

I am facing problems with electron-edge when the electron app which contains electron-edge is updated via electron-builder nsis update mechanism (same problem occured with squirrel update before as well).

electron: =1.4.4
electron-edge: @electron_v1.4.4

What seems to happen, is that the update process terminates the electron-app, deletes old install directory (appname/0.9.0-beta.1), installs to new install directory (appname/0.9.0-beta.2) and starts the app again.
At this point the importing/requiring of electron-edge fails as node-require still looks for electron-edge in the old install directory which is not existing anymore.

could not load edge module: Cannot find module 'C:/Users/username/AppData/Local/Programs/appname/0.9.0-beta.1/resources/app.asar/node_modules/electron-edge/lib/native/win32/x64/6.5.0/edge_nativeclr

Did you experience this problem before and is the assumption that the problem originates from node not being able to unload/clear cache of native modules ( nodejs/node#6160 ) correct? Any way to work around this limitation?

@consense
Copy link
Author

consense commented Jan 6, 2017

got resolved with recent version of electron-builder which doesnt change install directories anymore.

@consense consense closed this as completed Jan 6, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant