It seems like achieving that task may not be straightforward given your current configuration.
You have two options: either upgrade to npm v8.3
or later, which supports overrides
, or utilize yarn
with resolutions
.
For more information:
Overrides (npm):
https://docs.npmjs.com/cli/v8/configuring-npm/package-json#overrides
package.json
"overrides": {
"vue-tel-input": {
"libphonenumber-js": "^1.10.12"
}
}
Resolutions (yarn):
package.json
"resolutions": {
"libphonenumber-js": "^1.10.12"
}
Alternatively, you can manually handle the package-lock.json
file to specify the version.
"vue-tel-input": {
"version": "5.11.0",
"resolved": "https://registry.npmjs.org/vue-tel-input/-/vue-tel-input-5.11.0.tgz",
"integrity": "sha512-kw13LdbnSH+Zk5Qb06vflG7Abu6QsM1cQyKvTA9T4kaZeARvyvKo9YZmziy7WiSuar932DWRjGI0SJnban4a2A==",
"requires": {
"core-js": "^3.14.0",
"libphonenumber-js": "^1.9.6",
"vue": "^2.6.14"
}
},
You could try changing
"libphonenumber-js": "^1.9.6"
to use
^1.10.12
However, it's worth noting that upon my initial installation, it did install 1.10.12
"node_modules/libphonenumber-js": {
"version": "1.10.12",
"resolved": "https://registry.npmjs.org/libphonenumber-js/-/libphonenumber-js-1.10.12.tgz",
"integrity": "sha512-xTFBs3ipFQNmjCUkDj6ZzRJvs97IyazFHBKWtrQrLiYs0Zk0GANob1hkMRlQUQXbJrpQGwnI+/yU4oyD4ohvpw=="
},
Since ^
updates to the latest minor version (the second number), it's advisable to specify a specific version. Therefore, going from 1.9.*
to 1.10.*
and using ^1.9.6
means removing your lock file and reinstalling may result in obtaining 1.10.12
.