【问题标题】:Re-building ng-admin after editing source code编辑源代码后重新构建 ng-admin
【发布时间】:2016-06-08 11:35:18
【问题描述】:

我在ng-admin源代码中做了一些修改,所以我需要使用webpack重建它。

我使用 $ npm install 安装了 package.json 中的所有节点模块 然后运行webpack -d,它使用了webpack.config.js。 我删除了, exclude: /node_modules[\\\/](?!admin-config)/,因为我也需要重建 admin-config。

所以现在我有了所有的 js、css 和 map 文件, 但是当我尝试运行应用程序时出现此错误:

Error: [$injector:modulerr] Failed to instantiate module ng-admin due to:
Error: [$injector:modulerr] Failed to instantiate module ui.select due to:
Error: [$injector:nomod] Module 'ui.select' 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.

我确保 ui.select 已作为节点模块安装。

出了什么问题?

【问题讨论】:

    标签: javascript angularjs webpack ng-admin


    【解决方案1】:

    嗯... 我在 ng-admin 文件夹中有一个 node_modules 文件夹,该文件夹位于另一个 node_modules 文件夹中。

    + project
    | index.html
    | admin.js
    | + node_modules
      | + ng-admin
        | + node_modules
          ...
    

    我摆脱了父 node_modules 文件夹,当然更改了我的索引中的 js 路径,现在一切都正确构建了。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-11-04
      • 1970-01-01
      • 1970-01-01
      • 2022-12-17
      • 2017-04-23
      • 1970-01-01
      相关资源
      最近更新 更多