Hello guys,
i really need your help. i don’t know what really happen and how to solve it. i try reinstall npm, node, ionic and cordova but the version is still not change. i try already delete node_modules and package-lock.json, then npm i but still not change cordova version. i want to change it cordova 7.1.0. when i run cordova -v it show 7.1.0 but i run in my current project ionic info it show
cli packages: (/usr/local/lib/node_modules)
@ionic/cli-utils : 1.19.1
ionic (Ionic CLI) : 3.19.1
global packages:
cordova (Cordova CLI) : 8.0.0
local packages:
@ionic/app-scripts : 3.1.8
Cordova Platforms : android 7.0.0 browser 5.0.3 ios 4.5.4
Ionic Framework : ionic-angular 3.9.2
System:
Node : v8.9.4
npm : 5.6.0
OS : macOS High Sierra
Environment Variables:
ANDROID_HOME : not set
Misc:
backend : pro
But when i run ionic info in other project it show
cli packages: (/usr/local/lib/node_modules)
@ionic/cli-utils : 1.19.1
ionic (Ionic CLI) : 3.19.1
global packages:
cordova (Cordova CLI) : 7.1.0
local packages:
@ionic/app-scripts : 3.1.5
Cordova Platforms : none
Ionic Framework : ionic-angular 3.9.2
System:
Node : v8.9.4
npm : 2.15.12
OS : macOS High Sierra
Environment Variables:
ANDROID_HOME : not set
Misc:
backend : pro
I was going to post the very same question as I have two projects both showing different “global” Cordova CLI versions. Would be interested to know how this works.
I found out how to solve this problem. That command just realise what the problem. Before i solve found out in node_modules > cordova > package.json . My cordova version was 8.0.0 . So i try to delete the file cordova manual and take other project cordova (which is version 7.1.0) file put it in current project that have problem with cordova version. But this method does work because even it said the version is same with your cordova -v but still use my current project that have problem which use other cordova lib ( which is 8.0.0).
below is method work on me :
remove cordova without -g ( global) sudo npm uninstall cordova
install cordova that same with your cordova -v at cordova@[version] sudo npm install cordova@7.1.0
U will found it not remove your cordova in node_module but when u install cordova back it change the verison.
Reminder: dont make it global. Just run command on your project that has problem.