Injecting AngularJS app on Heroku, unable to find a suitable version of angular-animate

I am deploying AngularJS app to Heroku but I get this error in console:

remote: bower    ECONFLICT Unable to find suitable version for angular-animate
remote: 
remote:  !     Push rejected, failed to compile Node.js app
remote: 
remote: Verifying deploy....
remote: 
remote: !   Push rejected to test-app-12345

      

The problem (of course) seems to be dependency related angular-animate

.

I am using the Heroku angularJS compilation " Yo Angular " and followed their 4 step process to successfully deploy my application to Heroku.

I tried to fix this by modifying my file bower.json

as recommended in this stackoverflow question , hoping this will fix my problem. This is not true.

Locally I use grunt serve

to run the application and it works just fine for me.

Mine bower.json

looks like this:

{
  "name": "dashboard",
  "version": "0.0.0",
  "main": "index.html",
  "ignore": [
    "**/.*",
    "node_modules",
    "bower_components"
  ],
  "dependencies": {
    "jquery": "~2.0",
    "bootstrap": "~3.1.1",
    "angular": "~1.3.15",
    "angular-ui-router": "~0.2",
    "angular-animate": "~1.3.15",
    "angular-resource": "~1.3.15",
    "angular-cookies": "~1.3.15",
    "angular-mocks": "~1.3.15",
    "angular-ui-utils": "~0.1",
    "angular-bootstrap": "~0.11.2",
    "moment": "~2.5",
    "less.js": "~1.6",
    "font-awesome": "~4.2.0",
    "form-builder": "0.1.0",
    "restangular": "~1.4.0",
    "lodash": "~2.4.1",
    "satellizer": "~0.3.2",
    "angular-xeditable": "~0.1.8",
    "fullcalendar": "~2.1.1",
    "angular-ui-calendar": "~0.8.1",
    "checklist-model": "~0.1.3"
  },
  "resolutions": {
    "font-awesome": "~4.2.0",
    "jquery": "~2.0",
    "fullcalendar": "~2.1.1",
    "angular": "~1.3.15",
    "angular-bootstrap": "~0.11.2"
  }
}

      

This code is publicly available, so here is a link to the Github repo .

Anyone have any tips for me or a good idea on what I am doing wrong?

PS I found this information at bower

Github Issue Tracking which deals with the same issue. It might be helpful to sort this out.

+3


source to share


1 answer


This error occurs when two packages reference different versions of the same dependency.

You can fix the problem by running rm -rf bower_components/ ; bower install

Then, when prompted to select a version prefix, answer "!". like at my bottom. Notice how the gazebo adds a section "resolutions"

.



Unable to find a suitable version for angular-animate, please choose one:
    1) angular-animate#~1.2 which resolved to 1.2.28 and is required by form-builder#0.1.0
    2) angular-animate#~1.3.15 which resolved to 1.3.17 and is required by dashboard
    3) angular-animate#~1.4.3 which resolved to 1.4.3

Prefix the choice with ! to persist it to bower.json

? Answer: !3

      

Here is your allowed file bower.json

.

{
  "name": "dashboard",
  "version": "0.0.0",
  "main": "index.html",
  "ignore": [
    "**/.*",
    "node_modules",
    "bower_components"
  ],
  "dependencies": {
    "jquery": "~2.0",
    "bootstrap": "~3.1.1",
    "angular": "~1.3.15",
    "angular-ui-router": "~0.2",
    "angular-animate": "~1.4.3",
    "angular-resource": "~1.3.15",
    "angular-cookies": "~1.3.15",
    "angular-mocks": "~1.3.15",
    "angular-ui-utils": "~0.1",
    "angular-bootstrap": "~0.11.2",
    "moment": "~2.5",
    "less.js": "~1.6",
    "font-awesome": "~4.2.0",
    "form-builder": "0.1.0",
    "restangular": "~1.4.0",
    "lodash": "~2.4.1",
    "satellizer": "~0.3.2",
    "angular-xeditable": "~0.1.8",
    "fullcalendar": "~2.1.1",
    "angular-ui-calendar": "~0.8.1",
    "checklist-model": "~0.1.3"
  },
  "resolutions": {
    "font-awesome": "~4.2.0",
    "jquery": "~2.0",
    "fullcalendar": "~2.1.1",
    "angular": "~1.3.15",
    "angular-bootstrap": "~0.11.2",
    "angular-animate": "~1.4.3"
  }
}

      

+5


source







All Articles