No matching version found for @capacitor/electron@3.5.1

I cannot use the command ionic capacitor add electron to add support for Windows and macOS platforms. I get this error: No matching version found for @capacitor/electron@3.5.1.

Is Capacitor trying to use an outdated/deleted library? What do I do to make this work?

npx cap add @capacitor-community/electron :smile:

1 Like

electron is not a platform supported by Ionic CLI, and also @capacitor/electron platform is no longer maintained by ionic team and there are no 3.x releases of it.

You can use @capacitor-community/electron, which is a community maintained version, but you can’t use the ionic capacitor add @capacitor-community/electron, you’ll have to manually install it (i.e. npm install @capacitor-community/electron or the equivalent install command of your package manager of choice) and then npx cap add @capacitor-community/electron, and any other capacitor command you want to run can’t be prefixed with the ionic command, just use the capacitor command directly.

1 Like

thank you for your help. when i use that, i get:
npm ERR! Invalid package name “@capacitor/”: name can only contain URL-friendly characters