Failed to instantiate module ui-bootstrap for Angular after grunt serve

18 Views Asked by At

I'm encountering this problem:

Uncaught Error: [$injector:modulerr] Failed to instantiate module app due to:
Error: [$injector:modulerr] Failed to instantiate module ui.bootstrap due to:
Error: [$injector:nomod] Module 'ui.bootstrap' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.
http://errors.angularjs.org/1.5.11/$injector/nomod?p0=ui.bootstrap

The only solutions that were supposed to be installed: bower install angular-bootstrap, but this doesn't work. This dependency is already installed in bower.js

"dependencies": {
    "angular": "~1.5.8",
    "angular-animate": "~1.5.8",
    "angular-resource": "~1.5.8",
    "angular-route": "~1.5.8",
    "angular-sanitize": "~1.5.8",
    "angular-touch": "~1.5.8",
    "underscore": "~1.8.3",
    "angular-translate": "~2.8.1",
    "angular-translate-loader-static-files": "~2.11.0",
    "moment": "~2.10.6",
    "angular-translate-loader-partial": "~2.11.0",
    "ng-tags-input": "^3.1.1",
    "file-saver": "1.3.3",
    "angular-dynamic-locale": "^0.1.32",
    "angular-include-replace": "*"
  },
  "resolutions": {
    "angular": "~1.5.8",
    "angular-translate": "^2.11.0",
    "angular-translate-loader-static-files": "^2.11.0",
    "angular-bootstrap": "^1.3.3"
  }

I also found that I should have referenced the script in index.html, but whenever I add it and then run the grunt serve command, that line of script is automatically removed from my index.html

And I always end up with that reference error.

I tried installed the dependency and add the script to index.html, but that doesn't work.

0

There are 0 best solutions below