Angular6 Error: Uncaught (in promise): Error: StaticInjectorError(o)[e -> e]

偶尔善良 提交于 2020-01-24 00:13:10

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!