【发布时间】:2016-05-02 17:33:40
【问题描述】:
我在 angularjs 1.4.9 上构建了一个带有样板的应用程序。现在我通过“bower install angular-animate”添加了 angular-animate,从那时起,每个“grunt watch”都以错误结束:
Firefox 43.0.0 (Windows 10 0.0.0) AppCtrl isCurrentUrl should pass a dummy test FAILED
minErr/<@C:/path/to/app/src/main/webapp/app/vendor/angular/angular.js:68:12
我的浏览器错误堆栈如下所示:
未捕获的错误:[$injector:modulerr] 无法实例化模块 ngBoilerplate,原因如下: 错误:[$injector:modulerr] 无法实例化模块 ngBoilerplate.briefings_create 由于: 错误:[$injector:modulerr] 无法实例化模块 ngAnimate,原因是: 错误:[$injector:nomod] 模块“ngAnimate”不可用!您要么拼错了模块名称,要么忘记加载它。如果注册模块,请确保将依赖项指定为第二个参数。 http://errors.angularjs.org/1.4.9/$injector/nomod?p0=ngAnimate 在 http://localhost:8080/path/to/app/vendor/angular/angular.js:68:12 在 http://localhost:8080/path/to/app/vendor/angular/angular.js:2006:17 在确保(http://localhost:8080/path/to/app/vendor/angular/angular.js:1930:38) 在模块(http://localhost:8080/path/to/app/vendor/angular/angular.js:2004:14) 在 http://localhost:8080/path/to/app/vendor/angular/angular.js:4447:22 在 forEach (http://localhost:8080/path/to/app/vendor/angular/angular.js:341:20) 在 loadModules (http://localhost:8080/path/to/app/vendor/angular/angular.js:4431:5) 在 http://localhost:8080/path/to/app/vendor/angular/angular.js:4448:40 在 forEach (http://localhost:8080/path/to/app/vendor/angular/angular.js:341:20) 在 loadModules (http://localhost:8080/path/to/app/vendor/angular/angular.js:4431:5) http://errors.angularjs.org/1.4.9/$injector/modulerr?p0=ngAnimate&p1=Error%…80%2Fpath%2Fto%2F%2Fapp%2Fvendor%2Fangular%2Fangular.js%3A4431%3A5) 在 http://localhost:8080/path/to/app/vendor/angular/angular.js:68:12 在 http://localhost:8080/path/to/app/vendor/angular/angular.js:4470:15 在 forEach (http://localhost:8080/path/to/app/vendor/angular/angular.js:341:20) 在 loadModules (http://localhost:8080/path/to/app/vendor/angular/angular.js:4431:5) 在 http://localhost:8080/path/to/app/vendor/angular/angular.js:4448:40 在 forEach (http://localhost:8080/path/to/app/vendor/angular/angular.js:341:20) 在 loadModules (http://localhost:8080/path/to/app/vendor/angular/angular.js:4431:5) 在 http://localhost:8080/path/to/app/vendor/angular/angular.js:4448:40 在 forEach (http://localhost:8080/path/to/app/vendor/angular/angular.js:341:20) 在 loadModules (http://localhost:8080/path/to/app/vendor/angular/angular.js:4431:5) http://errors.angularjs.org/1.4.9/$injector/modulerr?p0=ngBoilerplate.brief…80%2Fpath%2Fto%2F%2Fapp%2Fvendor%2Fangular%2Fangular.js%3A4431%3A5) 在 http://localhost:8080/path/to/app/vendor/angular/angular.js:68:12 在 http://localhost:8080/path/to/app/vendor/angular/angular.js:4470:15 在 forEach (http://localhost:8080/path/to/app/vendor/angular/angular.js:341:20) 在 loadModules (http://localhost:8080/path/to/app/vendor/angular/angular.js:4431:5) 在 http://localhost:8080/path/to/app/vendor/angular/angular.js:4448:40 在 forEach (http://localhost:8080/path/to/app/vendor/angular/angular.js:341:20) 在 loadModules (http://localhost:8080/path/to/app/vendor/angular/angular.js:4431:5) 在 createInjector (http://localhost:8080/path/to/app/vendor/angular/angular.js:4356:11) 在 doBootstrap (http://localhost:8080/path/to/app/vendor/angular/angular.js:1677:20) 在引导程序(http://localhost:8080/path/to/app/vendor/angular/angular.js:1698:12) http://errors.angularjs.org/1.4.9/$injector/modulerr?p0=ngBoilerplate&p1=Er…0%2Fpath%2Fto%2Fapp%2Fvendor%2Fangular%2Fangular.js%3A1698%3A12)(匿名函数)@ angular.js:68(匿名函数) @ angular.js:4470forEach @ angular.js:341loadModules @ angular.js:4431createInjector @ angular.js:4356doBootstrap @ angular.js:1677bootstrap @ angular.js:1698angularInit @ angular.js: 1592(匿名函数)@angular.js:29652trigger@angular.js:3069defaultHandlerWrapper@angular.js:3358eventHandler@angular.js:3346即使我再次卸载 angular-animate,错误仍然存在。我在网上找不到任何解决此问题的方法。
这可能是业力问题或与凉亭有关吗?
感谢您的帮助!
提姆
【问题讨论】:
标签: javascript angularjs karma-runner bower boilerplate