NOTE I’ve removed the Platforms Folder because I want to fix this error first before adding a new platform.
What I tried already to compare my Application with a default Ionic App, I didn’t found any differences in app.modules, etc… It doesn’t show this error when I run the default App!
Please check your package.json. Is there a ‘ionic’ entry? like:
“ionic”: “XXXX”,
If yes, then remove it with npm uninstall ionic --save
If not, then probably there is one surviving from older installations inside the node_modules
I then suggest you remove the node_modules directory and then re-created it with: npm install
Tip: I would suggest of course, to take a backup of your directory before trying out the above steps. Just in case you brake something…
Tried to rebuild node_modules already, no luck.
Also there is no such thing like Ionic: VERSION in package.json. Yet I tried your command it gave me this error.
Also what always comes up when I do ionic serve is this error. I’ve tried to remove it already with the shown commands but the same error occured.
Regarding the warning on @ionic/cli-plugin-cordova and @ionic/cli-plugin-ionic-angular, it’s OK. Your package json has these plugins still but they are no longer required, since a newer version of CLI is used. You can remove them, but I would suggest after you resolve the warning with the CLI version.
Regarding the CLI version, I really don’t know what is happening then…
I would suggest one of the following ‘crude’ possible solutions…
If you have your project in remote repo… then clone locally to a fresh directory and rebuild from scratch (npm install, etc.)
Start a new project in a different directory, and copy over your source files from your existing directory.
These might ‘clean-up’ whatever is there that is causing the CLI warning