Reputation: 1079
Im using angular 1.4.14, and I want to install angular-animate, my json looks like this:
{
"name": "abc-front",
"version": "0.0.0",
"dependencies": {
"angular": "^1.4.0",
"bootstrap": "^3.2.0",
"angular-animate": "^1.4.0",
"angular-cookies": "^1.3.0",
"angular-resource": "^1.3.0",
"angular-route": "^1.3.0",
"angular-sanitize": "^1.3.0",
"angular-touch": "^1.3.0",
"angular-ui-router": "^0.2.18",
"angular-modal-service": "^0.10.1",
"angular-ui-notification": "^0.2.0",
"angular-material": "^1.0.9",
"moment": "^2.14.1",
"mdPickers": "^0.7.5"
},
"devDependencies": {
"angular-mocks": "^1.3.0",
"angular-ui-router": "^0.3.1"
},
"appPath": "app",
"moduleName": "abcFrontApp",
"resolutions": {
"angular": "^1.3.0",
"moment": "^2.14.1"
}
}
with bower install, bower ignores the version and install angular-animate#1.6.0 which is incompatible with angular#1.4.14.
I think I have 2 options:
Upgrade angular 1.4 to 1.6 which I think could have more consequences
Downgrade angular-animate to 1.4
I think the most secure option is 2, so I tried to downgrade the version unsuccessfully. I have tried to bower install angular-animate#1.4.x but I had no matches found.
Upvotes: 4
Views: 13315
Reputation: 1598
If you are using Node Package Management(npm), you can use the following command:
npm install [email protected]
using @x.x.x
after the package name means installing the specific version.
Upvotes: 3
Reputation: 6652
You can run bower update angular-animate
after you have saved your bower.json
file.
That will attempt to install the version you specified, but if bower finds a compatibility issue it will install the most compatible version, or prompt you for a resolution. You can, however, add the -f
flag to force bower to install the version you specified.
Upvotes: 2