capacitor-community / electron

Deploy your Capacitor apps to Linux, Mac, and Windows desktops, with the Electron platform! 🖥️
https://capacitor-community.github.io/electron/
MIT License
318 stars 58 forks source link

Cannot Pack a Fresh App #289

Open Hodes opened 4 weeks ago

Hodes commented 4 weeks ago

Describe the bug I created a new app and added the platform template from this project. Then I attempted to build the project, but it resulted in an error by using the provided 'electron:pack' npm command.

To Reproduce

cd /tmp
ionic start # go through the installer, react, blank
npm i @capacitor-community/electron
ionic build
npx cap add @capacitor-community/electron
#npx cap open @capacitor-community/electron # works correctly
cd electron
npm run electron:pack #fails

Expected behavior It should probably not fail and generate the artifacts

Errors

node_modules/builder-util-runtime/out/httpExecutor.d.ts:9:5 - error TS2411: Property '"accept-charset"' of type 'string | string[]' is not assignable to 'string' index type 'string'.

9     [key: string]: string;
      ~~~~~~~~~~~~~~~~~~~~~~

node_modules/builder-util-runtime/out/httpExecutor.d.ts:9:5 - error TS2411: Property '"accept-encoding"' of type 'string | string[]' is not assignable to 'string' index type 'string'.

9     [key: string]: string;
      ~~~~~~~~~~~~~~~~~~~~~~

node_modules/builder-util-runtime/out/httpExecutor.d.ts:9:5 - error TS2411: Property '"accept-language"' of type 'string | string[]' is not assignable to 'string' index type 'string'.

9     [key: string]: string;
      ~~~~~~~~~~~~~~~~~~~~~~
.....

The list goes on...

Found 17 errors in 2 files.

Errors  Files
    16  node_modules/builder-util-runtime/out/httpExecutor.d.ts:9
     1  node_modules/chokidar/types/index.d.ts:9

Desktop:

Additional context I think the problem is 100% reproducible, maybe the current dependencies are outdated in the electron app template.

Thankyou !