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 electron app #214

Open ZweiEuro opened 1 year ago

ZweiEuro commented 1 year ago

Describe the bug Cannot pack fresh electron app after creating new blank project.

To Reproduce run this:

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

Error

error TS2688: Cannot find type definition file for 'keyv'.
  The file is in the program because:
    Entry point for implicit type library 'keyv'

Expected behavior Normal compilation for electron pack

Desktop (please complete the following information):

hotrungnhan commented 1 year ago

install package in electron folder

ZweiEuro commented 1 year ago

@hotrungnhan

running:

cd electron
npm i package
npm run electron:pack

Still fails with the same error (tried with both 'package' and 'packager')

ZweiEuro commented 1 year ago

Solved! missing package was "keyv" didn't think it was solved this easily. npm i keyv in the electron folder.

I am not closing the issue though since the platform command should add all its dependencies itself