[英]Re-building ng-admin after editing source code
I made some modification in the ng-admin source code, so I need to rebuild it using webpack . 我对ng-admin源代码进行了一些修改,因此需要使用webpack对其进行重建。
I installed all node modules from the package.json with $ npm install
And then ran webpack -d
which used the webpack.config.js . 我安装了与所有的package.json节点模块
$ npm install
然后跑去webpack -d
其使用的webpack.config.js 。 I removed the , exclude: /node_modules[\\\\\\/](?!admin-config)/
because I need to rebuild admin-config too. 我删除了
, exclude: /node_modules[\\\\\\/](?!admin-config)/
因为我也需要重建admin-config。
So now I have all the js, css and map files, but when I try to run the application I get this error: 所以现在我有了所有的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.
I made sure ui.select is installed as a node module. 我确保ui.select已安装为节点模块。
What went wrong? 什么地方出了错?
Well... I had a node_modules folder inside the ng-admin folder which was inside another node_modules folder itself. 好吧...我在ng-admin文件夹中有一个node_modules文件夹,而在另一个node_modules文件夹本身中。
+ project
| index.html
| admin.js
| + node_modules
| + ng-admin
| + node_modules
...
I got rid of the parent node_modules folder, changed the js paths in my index of course, and everything builds correctly now. 我摆脱了父节点node_modules文件夹,当然更改了索引中的js路径,现在一切都正确构建了。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.