Ionic-capacitor v3 unknown option ‘–npm-client’

Getting an error while creating the project : error: unknown option ‘–npm-client’.
Any help will be appreciated.

@Smizz It looks like the npm-client option is no longer used, so you should be good to just omit it and re-run the command capacitor.cmd init AppName AppID --web-dir www

With appName being your appName, and AppID being your appId in capacitor.config.ts

@Smizz you can do 2 things:

  1. install testing version of ionic-cli: npm install -g @ionic/cli@testing
  2. install older version of capacitor, for example in package.json:
    “dependencies”: { … , “@capacitor/android”: “^2.4.2”, “@capacitor/core”: “2.4.2”, …},
    “devDependencies”: { … “@capacitor/cli”: “2.4.2”, … }
    first run: npm uninstall capacitor
    then run: npm install capacitor
    The 2nd works for me just now, 10sec ago.

If you are using @ionic/cli, then run
npm install -g @ionic/cli@latest

If you are using the old ionic CLI, then run

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