Prod build not loading (minification errors) in a clean project
It seems like ng build -prod doesn't minify things correctly. I first had some issues with prod builds trying to load individual files in my app (and getting 404s), so in order to check if it's something I did or not I tried creating an empty project with a single route and building that, and promptly encountered an error preventing me from testing further.
- OS? El Capitan
- Versions angular-cli: 0.0.39 node: 4.1.2 os: darwin x64
- Repro steps ng new testapp cd testapp ng g route someroute ng build -prod Serve dist folder in whatever way (ng serve -prod, nginx, python server etc)
- The log given by the failure main.js:11 ORIGINAL EXCEPTION: No provider for a!b.logError @ main.js:11a.call @ main.js:21(anonymous function) @ main.js:18ZoneDelegate.invoke @ zone.js:323onInvoke @ main.js:17ZoneDelegate.invoke @ zone.js:322Zone.run @ zone.js:216(anonymous function) @ zone.js:571ZoneDelegate.invokeTask @ zone.js:356onInvokeTask @ main.js:17ZoneDelegate.invokeTask @ zone.js:355Zone.runTask @ zone.js:256drainMicroTaskQueue @ zone.js:474ZoneTask.invoke @ zone.js:426 main.js:11 ORIGINAL STACKTRACE:b.logError @ main.js:11a.call @ main.js:21(anonymous function) @ main.js:18ZoneDelegate.invoke @ zone.js:323onInvoke @ main.js:17ZoneDelegate.invoke @ zone.js:322Zone.run @ zone.js:216(anonymous function) @ zone.js:571ZoneDelegate.invokeTask @ zone.js:356onInvokeTask @ main.js:17ZoneDelegate.invokeTask @ zone.js:355Zone.runTask @ zone.js:256drainMicroTaskQueue @ zone.js:474ZoneTask.invoke @ zone.js:426 main.js:11 Error: DI Exception at b as constructor at b as constructor at new b (main.js:20) at a._throwOrNull (main.js:19) at a._getByKeyDefault (main.js:19) at a._getByKey (main.js:19) at a.get (main.js:19) at b.get (main.js:18) at b._View_a0.createInternal (a.template.js:24) at b.a.create (main.js:18)
That's with the version I just got from npm, I'll try updating to the beta and see if that solves the issue.
Can't use ng g route in the newest version, so I can't to the exact same test, but without that it works with beta 8.
This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.