问题
I have Angular 6.0.3 in Production by using ng build --prod
in command line project get build success but while running http-server on dist getting the following Exception in browser console
ERROR Error: Uncaught (in promise): Error: StaticInjectorError(o)[e -> e]:
StaticInjectorError(Platform: core)[e -> e]:
NullInjectorError: No provider for e!
Error: StaticInjectorError(o)[e -> e]:
StaticInjectorError(Platform: core)[e -> e]:
NullInjectorError: No provider for e!
at e.get (main.7de871dd108e03a25bbd.js:1)
at main.7de871dd108e03a25bbd.js:1
at e (main.7de871dd108e03a25bbd.js:1)
at e.get (main.7de871dd108e03a25bbd.js:1)
at main.7de871dd108e03a25bbd.js:1
at e (main.7de871dd108e03a25bbd.js:1)
at e.get (main.7de871dd108e03a25bbd.js:1)
at ko (main.7de871dd108e03a25bbd.js:1)
at main.7de871dd108e03a25bbd.js:1
at Oo (main.7de871dd108e03a25bbd.js:1)
at e.get (main.7de871dd108e03a25bbd.js:1)
at main.7de871dd108e03a25bbd.js:1
at e (main.7de871dd108e03a25bbd.js:1)
at e.get (main.7de871dd108e03a25bbd.js:1)
at main.7de871dd108e03a25bbd.js:1
at e (main.7de871dd108e03a25bbd.js:1)
at e.get (main.7de871dd108e03a25bbd.js:1)
at ko (main.7de871dd108e03a25bbd.js:1)
at main.7de871dd108e03a25bbd.js:1
at Oo (main.7de871dd108e03a25bbd.js:1)
at j (polyfills.80f110349ef269c465c9.js:1)
at j (polyfills.80f110349ef269c465c9.js:1)
at polyfills.80f110349ef269c465c9.js:1
at e.invokeTask (polyfills.80f110349ef269c465c9.js:1)
at Object.onInvokeTask (main.7de871dd108e03a25bbd.js:1)
at e.invokeTask (polyfills.80f110349ef269c465c9.js:1)
at t.runTask (polyfills.80f110349ef269c465c9.js:1)
at d (polyfills.80f110349ef269c465c9.js:1)
CLI and Node version: Angular CLI: 6.1.2 Node: 10.7.0
In development mode same application running no issue.
So to solve an above Error Any help or there is the any way to know meaningfull definition instead of like Error is showing [e -> e].
来源:https://stackoverflow.com/questions/51971252/angular6-error-uncaught-in-promise-error-staticinjectorerroroe-e