错误错误:未捕获(承诺)错误StaticInjectorError [t]

时间:2019-03-01 12:40:48

标签: angular

使用prod build访问应用程序时出现以下错误。

main.5ad47805a2fb5449cbe9.bundle.js:1 ERROR Error: Uncaught (in promise): Error: StaticInjectorError[t]: 
  StaticInjectorError[t]: 
    NullInjectorError: No provider for t!
Error: StaticInjectorError[t]: 
  StaticInjectorError[t]: 
    NullInjectorError: No provider for t!
    at t.get (main.5ad47805a2fb5449cbe9.bundle.js:1)
    at main.5ad47805a2fb5449cbe9.bundle.js:1
    at t (main.5ad47805a2fb5449cbe9.bundle.js:1)
    at t.get (main.5ad47805a2fb5449cbe9.bundle.js:1)
    at main.5ad47805a2fb5449cbe9.bundle.js:1
    at t (main.5ad47805a2fb5449cbe9.bundle.js:1)
    at t.get (main.5ad47805a2fb5449cbe9.bundle.js:1)
    at kr (main.5ad47805a2fb5449cbe9.bundle.js:1)
    at main.5ad47805a2fb5449cbe9.bundle.js:1
    at Mr (main.5ad47805a2fb5449cbe9.bundle.js:1)
    at P (polyfills.16351918cc7f68a8b4c0.bundle.js:1)
    at P (polyfills.16351918cc7f68a8b4c0.bundle.js:1)
    at polyfills.16351918cc7f68a8b4c0.bundle.js:1
    at t.invokeTask (polyfills.16351918cc7f68a8b4c0.bundle.js:1)
    at Object.onInvokeTask (main.5ad47805a2fb5449cbe9.bundle.js:1)
    at t.invokeTask (polyfills.16351918cc7f68a8b4c0.bundle.js:1)
    at e.runTask (polyfills.16351918cc7f68a8b4c0.bundle.js:1)
    at v (polyfills.16351918cc7f68a8b4c0.bundle.js:1)

1 个答案:

答案 0 :(得分:0)

我无法添加评论,因为我没有可靠的声誉,但是您的问题可能是由不正确的注射引起的。如果要添加新组件,则必须将其添加到 app.module.ts 中。 Ej:

import { Base64 } from "@ionic-native/base64";

providers:[
  Base64,
],