problem with HostHook #448

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

Originally created by @bthidev on GitHub (Jan 30, 2020).

I want to use custom-electron-titlebar with electron.net
so I have create an HostHook and i Have add the package :

"custom-electron-titlebar": "^3.2.1"

and I have edit the index.ts with this code :

import * as Electron from "electron";
import { Connector } from "./connector";
import { Titlebar, Color } from 'custom-electron-titlebar'
export class HookService extends Connector {
    constructor(socket: SocketIO.Socket, public app: Electron.App) {
        super(socket, app);
        let titlebar = new Titlebar({
            backgroundColor: Color.fromHex('#34495'),

        });
    }

    onHostReady(): void {
    }
}

In ElectronHostHook/node_modules I can see the node module but it doesn't wokr ( nothing append )

but if I manualy edit the package.json from obj/host/package.json for add my module it work,
the problem, when I use electronize start it overwrite my edit,
It's possible to create a custom package.json ?

Originally created by @bthidev on GitHub (Jan 30, 2020). I want to use custom-electron-titlebar with electron.net so I have create an HostHook and i Have add the package : ``` "custom-electron-titlebar": "^3.2.1" ``` and I have edit the index.ts with this code : ``` import * as Electron from "electron"; import { Connector } from "./connector"; import { Titlebar, Color } from 'custom-electron-titlebar' export class HookService extends Connector { constructor(socket: SocketIO.Socket, public app: Electron.App) { super(socket, app); let titlebar = new Titlebar({ backgroundColor: Color.fromHex('#34495'), }); } onHostReady(): void { } } ``` In ElectronHostHook/node_modules I can see the node module but it doesn't wokr ( nothing append ) but if I manualy edit the package.json from obj/host/package.json for add my module it work, the problem, when I use electronize start it overwrite my edit, It's possible to create a custom package.json ?
claunia added the bug label 2026-01-29 16:39:52 +00:00
Author
Owner

@bthidev commented on GitHub (Jan 30, 2020):

sorry my script need to be in front htlm not in Host hook, but it's possible to make custom dependance ?

@bthidev commented on GitHub (Jan 30, 2020): sorry my script need to be in front htlm not in Host hook, but it's possible to make custom dependance ?
Author
Owner

@Melethainiel commented on GitHub (Apr 7, 2021):

Hi @speedi57,
I have the same problem, but I can't find how to do it... Can you explain a bit more please ?

@Melethainiel commented on GitHub (Apr 7, 2021): Hi @speedi57, I have the same problem, but I can't find how to do it... Can you explain a bit more please ?
Author
Owner

@bthidev commented on GitHub (Apr 7, 2021):

The easiest way I found was to use ElectronNET.CLI from source and modify the package.json of ElectronNET.Host to add the dependencies I needed, I don't know if since my problem another solution was found

@bthidev commented on GitHub (Apr 7, 2021): The easiest way I found was to use ElectronNET.CLI from source and modify the package.json of ElectronNET.Host to add the dependencies I needed, I don't know if since my problem another solution was found
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/Electron.NET#448