Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Support @electron/remote instead of the old require('electron').remote #70

Open
2 of 3 tasks
CMiksche opened this issue Sep 7, 2021 · 16 comments
Open
2 of 3 tasks

Comments

@CMiksche
Copy link

CMiksche commented Sep 7, 2021

The current implementation works only with old versions of Electron because require('electron').remote is now outdated and we have an @electron/remote Package instead of it.

So to support the new implementation, the dependencies would need to be updated, @electron/remote added and the whole Code would need a refactoring because many things are now outdated....

  • Update dependencies
  • Add @electron/remote
  • Refactor code

I already created a fork and started updating the dependencies: https://github.com/CMiksche/ngx-electron

@danielehrhardt
Copy link

Same Problem here.

@kzimny
Copy link

kzimny commented Sep 19, 2021

The same issue in my project. After update to Electron 14.0.1 the following error occurs:
Error: node_modules/ngx-electron/lib/electron.service.d.ts:17:31 - error TS2694: Namespace 'Electron' has no exported member 'Remote'. Please make a new release asasp.

@jmorrisIII
Copy link

@CMiksche What version(s) does it work on?

@kzimny
Copy link

kzimny commented Sep 20, 2021

In my project it is electron version 13.1.6

@CMiksche
Copy link
Author

@CMiksche What version(s) does it work on?

I have a old project with "electron": "^6.0.10",

@IgorGeorgioski
Copy link

Hello, can someone please check this?

@kzimny
Copy link

kzimny commented Sep 24, 2021

This project has not been updated for two years. Maybe the package owner is not interested in further development?

@IgorGeorgioski
Copy link

Anyone has any alternative libraries? Or any way to use the IPC with angular, since I want to update electron to the latest version.

@kzimny
Copy link

kzimny commented Sep 24, 2021

I'm in the same situation. @CMiksche do you see any chance to prepare a PR in the next few days/weeks? I looked at the scource code. This is a small project with a one class and one service class, seems to not be a big challenge. Hopefully the @ThorstenHans would agree to prepare a new release.

@CMiksche
Copy link
Author

@CMiksche do you see any chance to prepare a PR in the next few days/weeks?

Not really. We ditched this package and found another solution for our use case - so from my part it's not necessary anymore.

@IgorGeorgioski
Copy link

@CMiksche do you see any chance to prepare a PR in the next few days/weeks?

Not really. We ditched this package and found another solution for our use case - so from my part it's not necessary anymore.

Can you please provide me with the solution how can we use electron in our Angular app? I have tried examples from the internet but non of them seems to be working.

@kzimny
Copy link

kzimny commented Sep 24, 2021

@ThorstenHans do you intend to fix the issue and maintain your package in the future or is this project dead?

@ThorstenHans
Copy link
Owner

ThorstenHans commented Sep 24, 2021 via email

@kzimny
Copy link

kzimny commented Oct 2, 2021

Instead of using ngx-electron package use your own ElectronService. An example can be found here.

@kbuffington
Copy link

kbuffington commented Nov 2, 2021

Instead of using ngx-electron package use your own ElectronService. An example can be found here.

This is a much simpler solution than waiting on ngx-electron updates. Was essentially just a find and replace or where I was importing the old ElectronService.

Only "gotcha" is that in your main.js you need to add this line:

require('@electron/remote/main').initialize();

Otherwise attempting to use .remote will fail with a cryptic WebContents #1 called ipcRenderer.sendSync() with 'REMOTE_BROWSER_REQUIRE' channel without listeners. error.

@bampakoa
Copy link

Hello all 👋,

As a user of this library, I have just started a new initiative for going this amazing effort from @ThorstenHans further which is called ngx-electronyzer.

This project is heavily inspired by the work that Thorsten has put into ngx-electron. The only difference is that it does not expose the remote module, yet. I plan to add more features shortly so I would appreciate any feedback that you may have.

@ThorstenHans I have added an appropriate section in the README file to refer back to you and ngx-electron. Thanks very much for the inspiration with this amazing project 🙏

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

8 participants