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

Build error when using 5.0.1 #269

Closed hatsantos closed 9 months ago

hatsantos commented 9 months ago

Describe the bug When using the latest version (version 5.0.1) an error happens when trying to build the electron app.

npm run build

CapAngular@1.0.0 build
tsc && electron-rebuild

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;
      ~~~~~~~~~~~~~~~~~~~~~~

node_modules/builder-util-runtime/out/httpExecutor.d.ts:9:5 - error TS2411: Property ''content-length'' of type 'string | number' 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 ''proxy-authenticate'' 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 ''sec-websocket-extensions'' 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 ''sec-websocket-protocol'' 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 ''set-cookie'' 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 ''www-authenticate'' 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' 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 'connection' 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 'cookie' 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 'dav' 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 'link' 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 'prgama' 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 'via' of type 'string | string[]' is not assignable to 'string' index type 'string'.

9     [key: string]: string;

To Reproduce

This can be easily reproduced with a sample ionic app. Steps to reproduce the behavior:

  1. ionic start > > angular > standalone
  2. cd
  3. npm i @capacitor-community/electron
  4. ionic build --prod
  5. npx cap add @capacitor-community/electron
  6. cd electron
  7. npm run build (or any other command)

Expected behavior App should build successfully.

Desktop (please complete the following information):

jepiqueau commented 9 months ago

@hatsantos please read the info i issue with the latest release of to day

benyamin94 commented 9 months ago

@jepiqueau when I install capacitor to 5.4.0, I still get the above error

jepiqueau commented 9 months ago

@benyamin94 did you add "skipLibCheck:true" in the tsconfig.json file in the electron folder.

benyamin94 commented 9 months ago

thanks that solved the problem

jepiqueau commented 9 months ago

@benyamin94 you are welcome

fxsalazar commented 8 months ago

Should skipLibCheck:true be added by default to the template?

jepiqueau commented 8 months ago

@fxsalazar @IT-MikeS i agree with you it should