Is still possible to create a desktop app with Electron and Ionic 6?

Hi,
I’m trying to create a desktop app with Ionic 6 and Electron.
I’m followinng these tutorials:

And I’ve followed these steps starting from a new brand app:

ionic start myPhotoGallery my-first-app --type=angular --capacitor
cd myPhotoGallery
npm install ngx-electron electron
npm install electron-packager --save-dev
ionic build
npx cap add electron
npx cap open electron

However the last command doesn’t nothing and I have not an Electron folder in the project.
I’m using:

Windows 10 Pro - 21H2
Ionic:

   Ionic CLI                     : 6.18.1 
   Ionic Framework               : @ionic/angular 5.6.7
   @angular-devkit/build-angular : 12.0.1
   @angular-devkit/schematics    : 12.0.1
   @angular/cli                  : 12.0.1
   @ionic/angular-toolkit        : 3.1.1

Capacitor:

   Capacitor CLI      : 3.0.0
   @capacitor/android : 3.0.0
   @capacitor/core    : 3.0.0
   @capacitor/ios     : 3.0.0

Utility:

   cordova-res : not installed globally
   native-run  : 1.3.0

System:

   NodeJS : v16.14.2 (C:\Program Files\nodejs\node.exe)
   npm    : 8.5.0
   OS     : Windows 10

Which could be the problem according to you?
How can I debug the problem?

Thank you very much

Claudio

Hi
Same issue here while trying to do the same commands.

This did do the trick though:

For you too?

In my case the electron folder is not created.

cld

Also it is not generated with the community version? It does work on my side…

Sorry, yes it is true, with the community edition if I execute these steps:

ionic start myPhotoGallery my-first-app --type=angular --capacitor
cd myPhotoGallery
npm i @capacitor-community/electron
ionic build
npx cap add @capacitor-community/electron
cd electron
npm run build
npm run electron:start-live
npm run electron:pack

The run build command fails with this error:

>npm run build

> Photo Gallery Cap Ng@1.0.0 build
> tsc && electron-rebuild

capacitor.config.ts:6:3 - error TS2322: Type '{ appId: string; appName: string; bundledWebRuntime: false; npmClient: string; webDir: string; }' is not assignable to type 'CapacitorConfig'.
  Object literal may only specify known properties, and 'npmClient' does not exist in type 'CapacitorConfig'.

6   npmClient: "npm",
    ~~~~~~~~~~~~~~~~

Found 1 error.

So, I’m looking for other tutorials, but It seems that, despite the announcements, the integration with electron is not so simple and supported.

cld

With these commands the error during the build phase is ignored and the demo app starts:

ionic start myPhotoGallery my-first-app --type=angular --capacitor
cd myPhotoGallery
npm i @capacitor-community/electron
ionic build
npx cap add @capacitor-community/electron
cd electron
npm run electron:start-live