build with --prod fails, but without it it works just fine.

59 views
Skip to first unread message

Martin Mucha

unread,
Mar 22, 2017, 2:27:27 AM3/22/17
to Angular and AngularJS discussion
Hi,

following command builds app, which works just fine:

ng build --target=development --environment=prod --base-href /$npm_package_config_contextpath/

but if I try to replace that with

ng build --target=production --environment=prod --base-href /$npm_package_config_contextpath/

I got following errors (I'm showing only exception messages):

EXCEPTION: No provider for t!
vendor.314f210….bundle.js:570 ORIGINAL STACKTRACE:
vendor.314f210….bundle.js:570 Error: DI Error
vendor.314f210….bundle.js:570 EXCEPTION: Uncaught (in promise): Error: DI Error
Error: DI Error
vendor.314f210….bundle.js:570 ORIGINAL STACKTRACE:
vendor.314f210….bundle.js:570 Error: Uncaught (in promise): Error: DI Error
Error: DI Error
polyfills.483ff57….bundle.js:36 Unhandled Promise rejection: No provider for t! ; Zone: angular ; Task: Promise.then ; Value: e {__zone_symbol__error: Error: DI Error
polyfills.483ff57….bundle.js:36 g {__zone_symbol__error: Error: Uncaught (in promise): Error: DI Error
Error: DI Error


any idea why is this happening? I (kinda) thought, that --prod should only enable some more agressive optimizations, but this seem too agressive ;)

thanks for any hint,
M.
Reply all
Reply to author
Forward
0 new messages