Open Ch3shireDev opened 3 years ago
I also am seeing this same issue. Curious if anyone has a workaround?
Same here, even with a basic new Angular project (without IONIC) that has both Electron and ngx-electron installed
same issue here
Looks like the remote module has been deprecated in Electron 12 and been removed in Electron 14 (https://www.electronjs.org/blog/electron-14-0#removed-remote-module). They moved the remote stuff into its own package (https://github.com/electron/remote/blob/main/README.md). So as a quick fix I would assume that downgrading to version 13 should do the trick. But of cource I would love to see this change reflected in ngx-electron.
Has this project been abandoned or is remote going to be updated?
Has this project been abandoned or is remote going to be updated? It's been three months no and there is no movement in the issue. I'd call this abandonware...
Had the same issue. Let's hope someone fixes this...
I went into ./node_modules/ngx-electron/lib/electron.service.d.ts and comment out this line:
// readonly remote: Electron.Remote;
It compiled fine, and using axious for http, rest, google access and authentication all my remote issues were handled.
Note that if you update the module you will have to reload it, or do a branch of this and use that instead.
I went into ./node_modules/ngx-electron/lib/electron.service.d.ts and changed the type: readonly remote: any;
I guess that's not a good practice, but solved my problem.
I went into ./node_modules/ngx-electron/lib/electron.service.d.ts and changed the type: readonly remote: any;
I guess that's not a good practice, but solved my problem.
Yup - that works too - but as you say neither of our solutions is best practice. Since this appears to not be maintained, the best practice for either of our solutions would probably be to fork the project to make the change so that we do not have to keep making the change over and over.
I went into ./node_modules/ngx-electron/lib/electron.service.d.ts and changed the type: readonly remote: any; I guess that's not a good practice, but solved my problem.
Yup - that works too - but as you say neither of our solutions is best practice. Since this appears to not be maintained, the best practice for either of our solutions would probably be to fork the project to make the change so that we do not have to keep making the change over and over.
Great answer! You got the point!
Note: I ran into this as well. looks like still not fixed with npx-electron.
one addition to helping others. when you make your local change, use the package: patch-package https://www.npmjs.com/package/patch-package
You can make the edit, store the edit in your local repo, then tie it into post-install so it applies the edit again for future npm installations/other machines on your project. see patch-package readme.
Again, unfortunate but, this at least saves you from editing it every time, or scripting it yourself.
creates folder patches, in it you find a file and can see your delta in there:
- readonly remote: Electron.Remote;
+ readonly remote: any;
working well for me.
I went into ./node_modules/ngx-electron/lib/electron.service.d.ts and comment out this line:
// readonly remote: Electron.Remote;
It compiled fine, and using axious for http, rest, google access and authentication all my remote issues were handled.
Note that if you update the module you will have to reload it, or do a branch of this and use that instead.
thank you <3 it worked for me
(found on Windows).
How to reproduce:
After that I change
src/app/app.module.ts
from:to
Then I spawn
ionic build
and I get the following error:My
package.json
file: