Si estamos empezando a crear una app con Ionic y nos arroja el siguiente error:
> capacitor init example-app io.ionic.starter –web-dir www –npm-client npm
error: unknown option ‘–npm-client’
[ERROR] An error occurred while running subprocess capacitor.capacitor init example-app io.ionic.starter –web-dir www –npm-client npm exited with exit code 1.
Re-running this command with the –verbose flag may provide more information.
Installing dependencies may take several minutes.
Deberíamos reinstalar el nuevo cli de ionic, para ello:
npm uninstall -g ionic npm uninstall -g @ionic/cli npm install -g @ionic/cli
Volvemos a ejecutar el comando para crear la app y debería de funcionar.