Error: unknown option '--npm-client'

getting this issue when trying to get capacitor up and running in an existing project.

capacitor init Ionic-Sandbox io.ionic.starter --npm-client npm
error: unknown option '--npm-client'
[ERROR] An error occurred while running subprocess capacitor.
        
        capacitor init Ionic-Sandbox io.ionic.starter --npm-client npm exited with exit code 1.
        
        Re-running this command with the --verbose flag may provide more information.

I have tried:

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

suggested here and this does not fix my issue. any help would be appriciated.

Try following our Using Capacitor with Ionic Framework. It has steps for getting Capacitor set up with an existing Ionic application. Sounds like just what you need! :grinning_face_with_smiling_eyes:

yes I had looked at that and followed the steps (clearly missed something). then I got the error…

when running:

ionic integrations enable capacitor

I get:

[ERROR] An error occurred while running subprocess capacitor.
        
        capacitor init Ionic-Sandbox io.ionic.starter --npm-client npm exited with exit code 1.
        
        Re-running this command with the --verbose flag may provide more information.