ngx-electron icon indicating copy to clipboard operation
ngx-electron copied to clipboard

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

Open CMiksche opened this issue 4 years ago • 16 comments

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....

  • [x] Update dependencies
  • [x] Add @electron/remote
  • [ ] Refactor code

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

CMiksche avatar Sep 07 '21 15:09 CMiksche

Same Problem here.

danielehrhardt avatar Sep 10 '21 17:09 danielehrhardt

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.

kzimny avatar Sep 19 '21 08:09 kzimny

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

jmorrisIII avatar Sep 20 '21 16:09 jmorrisIII

In my project it is electron version 13.1.6

kzimny avatar Sep 20 '21 16:09 kzimny

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

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

CMiksche avatar Sep 20 '21 17:09 CMiksche

Hello, can someone please check this?

IgorGeorgioski avatar Sep 24 '21 09:09 IgorGeorgioski

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

kzimny avatar Sep 24 '21 09:09 kzimny

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

IgorGeorgioski avatar Sep 24 '21 10:09 IgorGeorgioski

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.

kzimny avatar Sep 24 '21 10:09 kzimny

@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.

CMiksche avatar Sep 24 '21 13:09 CMiksche

@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.

IgorGeorgioski avatar Sep 24 '21 13:09 IgorGeorgioski

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

kzimny avatar Sep 24 '21 17:09 kzimny

Actually not working in the scope of electron / angular. Will look into all open issues next week

https://thorsten-hans.com


From: Krzysztof Zimny @.> Sent: Friday, September 24, 2021 7:17:24 PM To: ThorstenHans/ngx-electron @.> Cc: Thorsten Hans @.>; Mention @.> Subject: Re: [ThorstenHans/ngx-electron] Support @electron/remote instead of the old require('electron').remote (#70)

@ThorstenHanshttps://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FThorstenHans&data=04%7C01%7C%7C81c1adb45ac0438e0eec08d97f7f2d8d%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637681006461773211%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=Dz2BbqD1AbEaownmL%2B%2F9lQ2wNbyfl9c%2B3uCHvAQHUVw%3D&reserved=0 do you intend to fix the issue and maintain your package in the future or is this project dead?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FThorstenHans%2Fngx-electron%2Fissues%2F70%23issuecomment-926794121&data=04%7C01%7C%7C81c1adb45ac0438e0eec08d97f7f2d8d%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637681006461783172%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=qtpxG4kapmhqYpzp7JBVzEHqO29%2B%2Fs%2ByvvEgIRQcyUI%3D&reserved=0, or unsubscribehttps://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAACXL7CYVYIL7KBSLT2IHPLUDSXCJANCNFSM5DSTRDLA&data=04%7C01%7C%7C81c1adb45ac0438e0eec08d97f7f2d8d%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637681006461793124%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=0Mx3WncYBv5zhfRpliFg4O9PF%2FkpgmDb7A6dIN7CQXQ%3D&reserved=0.

ThorstenHans avatar Sep 24 '21 17:09 ThorstenHans

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

kzimny avatar Oct 02 '21 12:10 kzimny

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.

kbuffington avatar Nov 02 '21 19:11 kbuffington

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 🙏

bampakoa avatar Jul 21 '22 20:07 bampakoa