繁体   English   中英

添加了角叶指令之后的Grunt构建失败

[英]Grunt build failing after adding angular-leaflet-directive

我刚刚在项目中添加了angular-leaflet-directive,当我用Grunt构建它时,现在却失败了。 依赖关系是使用Bower添加的。 该项目是使用Yeoman角发生器生成的。

在这里,我在我的app.js中包含了传单指令

angular
  .module('statsApp', [
    'ngCookies',
    'ngResource',
    'ngSanitize',
    'ngRoute',
    'leaflet-directive'
  ])

然后,现在,我只是以<leaflet></leaflet>为起点。

当Grunt构建失败时,我会收到此错误消息

    Error: [$injector:modulerr] Failed to instantiate module statsApp due to:
    Error: [$injector:modulerr] Failed to instantiate module leaflet-directive due to:
    Error: [$injector:nomod] Module 'leaflet-directive' 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.

这样的帖子解决了我的问题。 它不是特定于我要添加的模块,而是特定于Karma测试失败,因为它们不了解传单指令模块。

AngularJS错误:ngAnimate模块不可用

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM