Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: error: unknown option '--npm-client' for 'ionic integrations enable capacitor' command #4603

Closed
BossR8 opened this issue May 21, 2021 · 4 comments

Comments

@BossR8
Copy link

BossR8 commented May 21, 2021

Bug Report

When I met an error: unknown option '--npm-client error when I call ionic integrations enable capacitor.

Capacitor Version

Capacitor Doctor

Latest Dependencies:

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

Installed Dependencies:

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

[success] Android looking great! 👌

Code Reproduction

npm install -g ionic
ionic start appname
cd appname
npm install --save @capacitor/core @capacitor/cli
integrations enable capacitor
-> output

npm.cmd i --save -E @capacitor/core

  • @capacitor/core@3.0.0
    updated 1 package and audited 89 packages in 1.408s

5 packages are looking for funding
run npm fund for details

found 0 vulnerabilities

npm.cmd i -D -E @capacitor/cli

  • @capacitor/cli@3.0.0
    updated 1 package and audited 89 packages in 4.464s
    found 0 vulnerabilities

capacitor.cmd init ionic-app-base io.ionic.starter --npm-client npm
error: unknown option '--npm-client'
[ERROR] An error occurred while running subprocess capacitor.

    capacitor.cmd init ionic-app-base io.ionic.starter --npm-client npm exited with exit code 1.

    Re-running this command with the --verbose flag may provide more information.

Other Technical Details

npm --version output:
6.13.7
node --version output:
v14.16.1
ionic info
Ionic:

Ionic CLI : 5.4.16 (C:\Users\jeonghwa\AppData\Roaming\npm\node_modules\ionic)
Ionic Framework : @ionic/angular 5.6.7
@angular-devkit/build-angular : 0.1102.13
@angular-devkit/schematics : 11.2.13
@angular/cli : 11.2.13
@ionic/angular-toolkit : 3.1.1

Utility:

cordova-res : 0.15.3
native-run : 1.3.0

System:

NodeJS : v14.16.1 (C:\Program Files\nodejs\node.exe)
npm : 6.13.7
OS : Windows 10

Additional description

It worked fine a few days ago, but suddenly I got this error. I've tested this on other systems and also encountered the same symptom. So I wonder if the ionic template has some changes?

@jcesarmobile
Copy link
Member

jcesarmobile commented May 21, 2021

Looks like you are using the old ionic CLI, it was renamed to @ionic/cli long ago.

npm uninstall -g ionic
npm install -g @ionic/cli

You already reported it on ionic-cli repository and already told you this

ionic-team/ionic-cli#4702

@BossR8
Copy link
Author

BossR8 commented May 21, 2021

Sorry I did not know it. It works, Thanks

@lucioineichen
Copy link

I have the same error, and I have uninstalled and reinstalled it sooo many times and it still doesn't work

@ionitron-bot
Copy link

ionitron-bot bot commented Nov 10, 2022

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.

@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Nov 10, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants