hiitiger / goverlay

DirectX hook and game overlay solution for Electron, Qt and CEF, just like discord/steam game overlay,inject any app to overlay in your game
Other
817 stars 112 forks source link

Can't build electron overlay #95

Closed YoukaiCat closed 1 year ago

YoukaiCat commented 1 year ago
C:\projects\goverlay\goverlay>npm run build

> gelectron@1.0.1 build
> npm run build:main && npm run build:renderer

> gelectron@1.0.1 build:main
> tsc --project ./client/tsconfig.json

client/src/main/electron/app-entry.ts:482:27 - error TS2769: No overload matches this call.
  The last overload gave the following error.
    Argument of type '"new-window"' is not assignable to parameter of type '"zoom-changed"'.

482     window.webContents.on("new-window", (e, url) => {
                              ~~~~~~~~~~~~

  node_modules/electron/electron.d.ts:11172:5
    11172     on(event: 'zoom-changed', listener: (event: Event,
              ~~
    The last overload is declared here.

Found 1 error.
hiitiger commented 1 year ago

I'm not sure how this happened, or what code you changed but you can just comment out line ~480

  window.webContents.on("new-window", (e, url) => {
      e.preventDefault();
      shell.openExternal(url);
    });