简体   繁体   中英

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 .

I installed all node modules from the package.json with $ npm install And then ran webpack -d which used the webpack.config.js . I removed the , exclude: /node_modules[\\\\\\/](?!admin-config)/ because I need to rebuild admin-config too.

So now I have all the js, css and map files, but when I try to run the application I get this error:

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.

What went wrong?

Well... I had a node_modules folder inside the ng-admin folder which was inside another node_modules folder itself.

+ 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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