【问题标题】:Error: Uncaught (in promise): Error: StaticInjectorError[e -> t]: StaticInjectorError(Platform: core)[e -> t]: NullInjectorError: No provider for tI错误:未捕获(承诺中):错误:StaticInjectorError[e -> t]:StaticInjectorError(平台:核心)[e -> t]:NullInjectorError:没有 tI 的提供者
【发布时间】:2019-04-17 13:54:46
【问题描述】:

当我使用以下命令构建生产应用程序时,Ionic 页面未打开: - ionic cordova build android --prod --aot --vendor-chunk --common-chunk --delete-output-path --buildOptimizer

ERROR Error: Uncaught (in promise): Error: StaticInjectorError[e -> t]: 
StaticInjectorError(Platform: core)[e -> t]: 
NullInjectorError: No provider for t!
Error: StaticInjectorError[e -> t]: 
StaticInjectorError(Platform: core)[e -> t]: 
NullInjectorError: No provider for t!
at t.get (main.0ba0a52252d542706570.js:1)
at main.0ba0a52252d542706570.js:1
at t (main.0ba0a52252d542706570.js:1)
at t.get (main.0ba0a52252d542706570.js:1)
at main.0ba0a52252d542706570.js:1
at t (main.0ba0a52252d542706570.js:1)
at t.get (main.0ba0a52252d542706570.js:1)
at Ru (main.0ba0a52252d542706570.js:1)
at t.get (main.0ba0a52252d542706570.js:1)
at Ru (main.0ba0a52252d542706570.js:1)
at P (polyfills.102b4f7c459a8c593a9f.js:1)
at P (polyfills.102b4f7c459a8c593a9f.js:1)
at polyfills.102b4f7c459a8c593a9f.js:1
at e.invokeTask (polyfills.102b4f7c459a8c593a9f.js:1)
at Object.onInvokeTask (main.0ba0a52252d542706570.js:1)
at e.invokeTask (polyfills.102b4f7c459a8c593a9f.js:1)
at t.runTask (polyfills.102b4f7c459a8c593a9f.js:1)
at g (polyfills.102b4f7c459a8c593a9f.js:1)

没有生产标志,构建没有问题。所有页面都已打开,但它们的加载时间非常长。任何帮助都将是一个很大的帮助。

【问题讨论】:

    标签: cordova build ionic4


    【解决方案1】:

    问题是由于屏幕方向插件造成的。 我只是使用 npm 和 cordova 卸载了它。

    ionic cordova plugin remove cordova-plugin-screen-orientation
    npm uninstall @ionic-native/screen-orientation
    

    并将其从使用它的页面中删除。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-08-15
      • 2018-05-12
      • 2023-01-30
      • 1970-01-01
      • 2018-09-21
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多