当我使用以下命令构建生产应用程序时,无法打开离子页面: -离子Cordova构建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)
没有生产标记,构建没有问题。所有页面都已打开,但是它们的加载时间非常长。任何帮助将是一个很大的帮助。
答案 0 :(得分:0)
该问题是由于“屏幕方向”插件引起的。 我只是使用npm和cordova卸载了它。
ionic cordova plugin remove cordova-plugin-screen-orientation
npm uninstall @ionic-native/screen-orientation
并将其从使用它的页面中删除。