我最近将一个应用程序从早期的Ionic 2 Alpha版本升级到最新的Ionic 2 Beta 10.它导致我的一些代码破坏了,而且我有一个很糟糕的时间来理解我从JavaScript控制台获得的错误。所有TypeScript都捆绑在这个app.bundle.js文件中,这导致控制台在识别错误时指向错误的代码区域。理想情况下,我会在控制台输出中看到导致错误的实际文件。
有谁知道我怎么能做到这一点?
谢谢!
browser_adapter.js:77EXCEPTION: Error: Uncaught (in promise): EXCEPTION: Error in :0:0
ORIGINAL EXCEPTION: No provider for ConfigService! (ESOService -> ConfigService)
ORIGINAL STACKTRACE:
Error: DI Exception
at NoProviderError.BaseException [as constructor] (http://localhost:8100/build/js/app.bundle.js:2805:23)
at NoProviderError.AbstractProviderError [as constructor] (http://localhost:8100/build/js/app.bundle.js:27996:16)
at new NoProviderError (http://localhost:8100/build/js/app.bundle.js:28033:16)
at ReflectiveInjector_._throwOrNull (http://localhost:8100/build/js/app.bundle.js:29021:19)
at ReflectiveInjector_._getByKeyDefault (http://localhost:8100/build/js/app.bundle.js:29049:25)
at ReflectiveInjector_._getByKey (http://localhost:8100/build/js/app.bundle.js:29012:25)
at ReflectiveInjector_._getByReflectiveDependency (http://localhost:8100/build/js/app.bundle.js:29002:21)
at ReflectiveInjector_._instantiate (http://localhost:8100/build/js/app.bundle.js:28899:36)
at ReflectiveInjector_._instantiateProvider (http://localhost:8100/build/js/app.bundle.js:28871:25)
at ReflectiveInjector_._new (http://localhost:8100/build/js/app.bundle.js:28860:21)
ERROR CONTEXT:
[object Object]
答案 0 :(得分:0)
许多制动改变都引入了不同的版本,如.beta8 查看这个github页面,根据最近的更改日志更改代码
https://github.com/driftyco/ionic/blob/master/CHANGELOG.md
更新Ionic并启动一个新项目并根据changlog重新实现代码,这有望避免所有错误