簡體   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