Ionic changing my plugins versions


Hello guys, I have the following plugins in my package.json:

"cordova-plugin-ionic": "4.1.7",
"cordova-plugin-ionic-webview": "1.2.1"

I need them to be that specific version, no more no less. But if I do ionic cordova run android, for example, it adds the caret ^ before the version, which will cause next person that download and install that project from a repository to get errors because of version changes, for example the cordova-plugin-ionic plugin goes to 4.2.0.

How can’t I prevent this?



if you want that version in any new project just in new project path just run : npm install
and it will install the packages in the package.json only


Hi, the problem isn’t when doing npm install. It is that wen I do a run, build, or add platform... it adds the caret before the version. This makes it that when I upload the project to Github, the next person that installs it, will get a newer version than the one I want them to have because it will have the caret before the version.

Of course I could just delete the carets before uploading it to gitlab, but that’s an annoying thing to do and I’d like to know if there is an option that prevents this from happening.


This has nothing to do with Ionic, but with Cordova. All the commands that begin with ionic cordova ... are run directly by Cordova CLI.

Pleaes confirm by running the command without the ionic prefix. Thanks.

What is your ionic info output? Which Cordova CLI version are you using?

Cordova has an issue tracker at where stuff like this can be reported.


I get an error saying that it isn’t a Cordova project if I dont put Ionic

This is my info:

cli packages: (C:\Users\Ulises\AppData\Roaming\npm\node_modules)

    @ionic/cli-utils  : 1.19.2
    ionic (Ionic CLI) : 3.20.0

global packages:

    cordova (Cordova CLI) : 8.0.0

local packages:

    @ionic/app-scripts : 3.1.10
    Cordova Platforms  : android 7.0.0
    Ionic Framework    : ionic-angular 3.9.2


    Android SDK Tools : 26.1.1
    Node              : v8.11.3
    npm               : 5.6.0
    OS                : Windows 10

Environment Variables:

    ANDROID_HOME : C:\Users\Ulises\AppData\Local\Android\Sdk


    backend : pro


Then something is really broken. Are you sure you ran it in the Ionic project?


Yes, I did ionic cordova platform add android right after it and it worked

Now I did it and it worked, but it already changed the plugin version putting the caret.


I also have the same problem it’s very very annoying. I’ve also seen it completely change versions to newer version which is even worse because i lose the last stable version.

This really needs fixed