[WARN] Detected locally installed Ionic CLI, but it's to old--using global CLI


#1

Hello, I am still trying to solve my problem click me and I think it has something todo with this WARNING.

This post sadly didn’t helped me out much.

Here is my Ionic Info.

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!

I hope someone can help me out!


#2

Hello,

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…

Regards


#3

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.

2018-02-03 07_48_52-Program Manager

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.
2018-02-03 07_49_59-npm

This is what happens when I try to remove it.
2018-02-03 07_50_57-npm

Thanks for any help!


#4

OK.

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…

  1. If you have your project in remote repo… then clone locally to a fresh directory and rebuild from scratch (npm install, etc.)

  2. 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

Regards


#5

I fixed the issue!

I’ve removed the @ionic/cli-plugin-cordova and @ionic/cli-plugin-ionic-angular, manually from package.json.

My Ionic info remains the same.

Sadly I don’t really know why the [WARN] Detected locally installed Ionic CLI, but it’s to old–using global CLI disappeard, so thats a bummer.

Maybe because I restarted my PC several times after updating npm and switching node versions back and forwand.

Thanks for the input anyway! :bird: