Getting an error while creating the project : error: unknown option ‘–npm-client’.
Any help will be appreciated.
2 Likes
@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:
- install testing version of ionic-cli: npm install -g @ionic/cli@testing
or - 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.
2 Likes
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
10 Likes
awesome, installing an older version worked for me, thanks a bunch!
edit: installing latest @ionic/cli did nothing. Current version is 6.19.1