Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

angular js unknown provider error angular-animate

After removing bower_components and making a cache clean I reinstalled dependencies using bower install. The app fails to load with following error Uncaught Error: [$injector:unpr] Unknown provider: $$forceReflowProvider <- $$forceReflow <- $$animateQueue <- $animate <- $compile <- $$animateQueue

Here is my bower.json

{
  "name": "angular-zolo",
  "version": "0.0.0",
  "dependencies": {
    "angular": "1.4.3",
    "json3": "~3.3.1",
    "es5-shim": "~3.0.1",
    "bootstrap-sass-official": "~3.1.1",
    "bootstrap": "~3.1.1",
    "angular-resource": ">=1.2.*",
    "angular-cookies": ">=1.2.*",
    "angular-sanitize": ">=1.2.*",
    "angular-bootstrap": "~0.11.0",
    "font-awesome": ">=4.1.0",
    "lodash": "~2.4.1",
    "angular-socket-io": "~0.6.0",
    "angular-ui-router": "~0.2.15",
    "angular-material": "master",
    "material-date-picker": "~1.1.7",
    "ng-table": "~0.7.1",
    "md-data-table": "*",
    "ngstorage": "~0.3.7",
    "ng-file-upload": "~6.0.4",
    "velocity": "~1.2.2",
    "nprogress": "~0.2.0"

  },
  "devDependencies": {
    "angular-mocks": ">=1.2.*",
    "angular-scenario": ">=1.2.*"
  },
  "resolutions": {
    "angular-material": "master",
    "angular": "~1.4.0",
    "lodash": "~3.9.3"

  }
}
like image 583
Pranav Kumar Avatar asked Aug 14 '15 13:08

Pranav Kumar


2 Answers

Just to highlight what Olivier said in a comment, make sure you keep your version of angular and angular-animate in sync.

From bower.json

Good

  "dependencies": {
    "angular": "~1.4.6",
    "angular-animate": "~1.4.6",

Bad - out of sync

  "dependencies": {
    "angular": "~1.4.0",
    "angular-animate": "~1.4.6",
like image 114
TrophyGeek Avatar answered Nov 18 '22 23:11

TrophyGeek


Angular-animate is not in your bower.json file, :) install it with :

bower install angular-animate --save
like image 34
Sofiene Djebali Avatar answered Nov 19 '22 00:11

Sofiene Djebali