【问题标题】:AngularJS error: Module 'ngCsv' is not availableAngularJS 错误:模块 'ngCsv' 不可用
【发布时间】:2016-08-21 02:11:28
【问题描述】:

我有两台计算机运行从 github 提取的相同代码。两台计算机都在 Ubuntu 16 上运行,一切都很好,直到将新的依赖项 (ngCsv) 添加到代码中。从那时起,我收到以下错误,但只在一台机器上:

angular.js:4053 Uncaught Error: [$injector:modulerr] Failed to instantiate module lergoApp due to:
Error: [$injector:modulerr] Failed to instantiate module ngCsv due to:
Error: [$injector:nomod] Module 'ngCsv' 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.

什么可能导致这个问题?

【问题讨论】:

    标签: angularjs npm


    【解决方案1】:

    Install ngCsv using npm 并在依赖注入中添加 ngCsv moduleName。

    【讨论】:

    • 感谢 Amir,但这似乎没有帮助。我做了 npm install --save ngcsv,将它添加到 package.json - 错误保持不变。
    【解决方案2】:

    通过删除整个文件夹并从github克隆解决了问题

    【讨论】:

      猜你喜欢
      • 2017-07-13
      • 1970-01-01
      • 1970-01-01
      • 2015-07-01
      • 1970-01-01
      • 2016-05-16
      • 1970-01-01
      • 2014-08-13
      • 2017-12-06
      相关资源
      最近更新 更多