how to use node module #169

Closed
opened 2026-01-29 16:32:48 +00:00 by claunia · 3 comments
Owner

Originally created by @leovictor on GitHub (May 30, 2018).

Originally assigned to: @GregorBiswanger on GitHub.

I'm trying to use a node module (iohook) but appears the message: Cannot find module 'iohook'. Is it possible to use node module with electron.net?

Originally created by @leovictor on GitHub (May 30, 2018). Originally assigned to: @GregorBiswanger on GitHub. I'm trying to use a node module (iohook) but appears the message: Cannot find module 'iohook'. Is it possible to use node module with electron.net?
claunia added the question label 2026-01-29 16:32:48 +00:00
Author
Owner

@GregorBiswanger commented on GitHub (Sep 26, 2018):

Hello @leovictor
how would you like to use your feature request?

Best,
Gregor

@GregorBiswanger commented on GitHub (Sep 26, 2018): Hello @leovictor how would you like to use your feature request? Best, Gregor
Author
Owner

@sachin-devitpl commented on GitHub (Feb 20, 2020):

Hello Gregor,
What is the solution for this ? If I want to use iohook package to be added in my electronize build, then what should I do ?

Thanks in advance..

@sachin-devitpl commented on GitHub (Feb 20, 2020): Hello Gregor, What is the solution for this ? If I want to use iohook package to be added in my electronize build, then what should I do ? Thanks in advance..
Author
Owner

@GregorBiswanger commented on GitHub (Feb 20, 2020):

Hi @sachin-devitpl

the HostHook API allows you to execute your own JavaScript/TypeScript code on the host process.

Create first an ElectronHostHook directory via the Electron.NET CLI, with the following command: electronize add hosthook.

In this directory you can install any NPM packages and embed your own JavaScript/TypeScript code. It is also possible to respond to events from the host process.

You find the sample source code in ours Demo-App (ElectronNET.WebApp) Controllers\HostHookController.cs and in the ElectronHostHook folder.

Cheers,
Gregor

@GregorBiswanger commented on GitHub (Feb 20, 2020): Hi @sachin-devitpl the **HostHook API** allows you to execute your own JavaScript/TypeScript code on the host process. Create first an ElectronHostHook directory via the Electron.NET CLI, with the following command: `electronize add hosthook`. In this directory you can install any NPM packages and embed your own JavaScript/TypeScript code. It is also possible to respond to events from the host process. You find the sample source code in ours Demo-App (ElectronNET.WebApp) `Controllers\HostHookController.cs` and in the `ElectronHostHook` folder. Cheers, Gregor
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/Electron.NET#169