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

Not able to add electron platform #228

Closed Saqib92 closed 1 year ago

Saqib92 commented 1 year ago

Describe the bug Not able to add electron platform in ionic + Capacitor project. My project is working absolutely fine with Android / IOS and Web.

Error

Running add command throwing this error.

$ npx cap add @capacitor-community/electron
ℹ Adding Electron platform: start 🚀
ℹ Adding Electron platform: extracting template
ℹ Adding Electron platform: copying capacitor config file
ℹ Adding Electron platform: setting up electron project
✖ Adding Electron platform: 
node:internal/process/promises:246
          triggerUncaughtException(err, true /* fromPromise */);
          ^

[UnhandledPromiseRejection: This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason "/bin/sh: line 0: cd: /Volumes/Seagate: No such file or directory
".] {
  code: 'ERR_UNHANDLED_REJECTION'
}

To Reproduce Just create blank ionic + Capacitor project and Run : npm i @capacitor-community/electron

Expected behavior It should add electron platform easily.

Screenshots Screenshot 2022-12-23 at 8 18 50 PM

Desktop (please complete the following information):

Additional context Application is working fine with Android and iOS.

Saqib92 commented 1 year ago

any Update?

IT-MikeS commented 1 year ago

Please provide a reproduction repo of your issue with a minimal code base. I could not reproduce this issue on either of my Macs nor a Windows machine using your description.

Saqib92 commented 1 year ago

Was able to add platform. Issue was my project is in my extended (external) drive. When i copied my project to main HD the add command works. Thanks.

dominicwa commented 1 year ago

I think this issue remains and that it fails like this if there's a space in the path to the project.

Saqib92 commented 1 year ago

I think this issue remains and that it fails like this if there's a space in the path to the project.

that might be the issue. as my external drive have space between its name.