ionic-team / capacitor

Build cross-platform Native Progressive Web Apps for iOS, Android, and the Web ⚡️
https://capacitorjs.com
MIT License
12.17k stars 1.01k forks source link

bug: Error running subprocess capacitor right after starting project #4870

Closed scarela closed 3 years ago

scarela commented 3 years ago

There is an error showing up right after starting a new ionic app with capacitor integration just by following commands in the tutorial.

Capacitor Version

Latest Dependencies:

@capacitor/cli: 3.1.2 @capacitor/core: 3.1.2 @capacitor/android: 3.1.2 @capacitor/ios: 3.1.2

Installed Dependencies:

@capacitor/android: not installed @capacitor/ios: not installed @capacitor/cli: 3.1.2 @capacitor/core: 3.1.2

Platform(s)

OpenSuse Leap 15.2

Current Behavior

Get this error when creating a new app: ` error: unknown option '--npm-client' [ERROR] An error occurred while running subprocess capacitor.

    capacitor init myApp io.ionic.starter --web-dir www --npm-client npm exited with exit code 1.

`

Expected Behavior

The app should be created without any issues if I have @ionic/cli and @capacitor/cli on their latests versions.

Code Reproduction

Either $ ionic start myApp sidemenu --type=angular --capacitor or $ ionic start myApp sidemenu will produce the same output.

Other Technical Details

npm --version output: v6.14.13

node --version output: v14.17.3

pod --version output (iOS issues only):

Additional Context

bug capacitor

thomasvidas commented 3 years ago

--npm-client is not an option in the Capacitor 3 CLI so does removing it fix this issue? I can take a look at the docs and update them accordingly

scarela commented 3 years ago

--npm-client is not an option in the Capacitor 3 CLI so does removing it fix this issue? I can take a look at the docs and update them accordingly

Yes, running it witout --npm-client fixes the issue. Thanks, appreciate it.

ionitron-bot[bot] commented 1 year ago

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Capacitor, please create a new issue and ensure the template is fully filled out.