I am trying to install cordova-plugin-googlemaps
version 2.2.9 for an Ionic project.
My package.json file reads as follows:
...
...
...
"dependencies": {
.
.
"cordova-plugin-googlemaps": "^2.2.9",
.
.
.
}
...
...
However, when I run npm install --verbose
, the information logged reads:
npm info lifecycle [email protected]~postinstall: [email protected]
On opening the generated package-lock.json file, it reads:
"cordova-plugin-googlemaps": {
"version": "2.5.1",
.
.
.
}
As it turns out, a different version of cordova-plugin-googlemaps
is installed.
I deleted the node_modules folder and ran npm i
again, but the same thing happens again and again.
When I uninstall the plugin and run npm install cordova-plugin-googlemaps@^2.2.9
, version 2.5.1 still gets installed.
How can I resolve this? Will copying the source code of v2.2.9 into my node_modules folder be a viable solution?
replace caret sign with tilde :
cordova-plugin-googlemaps@~2.2.1