将2015年基于Angular的NativeScript 3应用升级至7遇报错,求适配建议
老旧NativeScript Angular应用升级求助
- 现有一款2015年前后开发的NativeScript+Angular应用,迫切需要完成版本升级
- 此前对照官方升级指引开展操作,调试很久才让编译器正常启动运行,后续随即遇到大量报错,故障表象为Angular加载应用失败
- 面向社区征集实操经验:是否有其他开发者处理过同类型的老版本应用升级,是否存在针对2015年基于Angular开发的老旧NativeScript应用的补充升级规则,欢迎提出可落地的调整建议
- 本次操作的最新日志输出如下:
File change detected. Starting incremental webpack compilation... Hash: 930f5656308d0b87060d Version: webpack 4.27.1 Time: 7955ms Built at: 11/12/2020 11:12:59 AM Asset Size Chunks Chunk Names app/images/home_background.png 256 KiB [emitted] app/images/incident_map_placeholder.png 242 KiB [emitted] app/images/placeholder_image.png 7.62 KiB [emitted] bundle.js 157 KiB bundle [emitted] bundle package.json 112 bytes [emitted] runtime.js 71.4 KiB runtime [emitted] runtime tns-java-classes.js 0 bytes [emitted] vendor.js 5.89 MiB vendor [emitted] vendor Entrypoint bundle = runtime.js vendor.js bundle.js [./main.ts] 12.9 KiB {bundle} [built] + 368 hidden modules WARNING in Lazy routes discovery is not enabled. Because there is neither an entryModule nor a statically analyzable bootstrap code in the main file. Webpack compilation complete. Watching for file changes. Webpack build done! ERROR in src/main.ts(226,3): error TS2304: Cannot find name 'firebase'. src/main.ts(287,20): error TS2304: Cannot find name 'iosUuidModule'. Updating runtime package.json with configuration values... Project successfully prepared (android) Building project... Gradle build... + setting applicationId + applying user-defined configuration from C:\pathtoproject\nativescript\xxx\App_Resources\Android\app.gradle + using android X library androidx.legacy:legacy-support-v4:1.0.0 + adding nativescript runtime package dependency: nativescript-optimized-with-inspector + adding aar plugin dependency: C:\pathtoproject\nativescript\xxx\node_modules\nativescript-loading-indicator\platforms\android\nativescript_loading_indicator.aar + adding aar plugin dependency: C:\pathtoproject\nativescript\xxx\node_modules\@nativescript\core\node_modules\tns-core-modules-widgets\platforms\android\widgets-release.aar Project successfully built. The build result is located at: C:\pathtoproject\nativescript\xxx\platforms\android\app\build\outputs\apk\debug\app-debug.apk Installing on device emulator-5554... Successfully installed on device with identifier 'emulator-5554'. Restarting application on device emulator-5554... Successfully synced application au.com.xxx.app on device emulator-5554. JS: HMR: Hot Module Replacement Enabled. Waiting for signal. System.err: An uncaught Exception occurred on "main" thread. System.err: Unable to create application com.tns.NativeScriptApplication: com.tns.NativeScriptException: Error calling module function System.err: TypeError: application.start is not a function System.err: File: (file:///data/data/au.com.xxx.app/files/app/bundle.js:658:12) System.err: System.err: StackTrace: System.err: (file:///data/data/au.com.xxx.app/files/app/bundle.js:658:13) System.err: at ./main.ts(file:///data/data/au.com.xxx.app/files/app/bundle.js:664:30) System.err: at __webpack_require__(file: src\webpack\bootstrap:750:0) System.err: at checkDeferredModules(file: src\webpack\bootstrap:43:0) System.err: at webpackJsonpCallback(file: src\webpack\bootstrap:30:0) System.err: at (file:///data/data/au.com.xxx.app/files/app/bundle.js:2:57) System.err: at require(:1:266) System.err: System.err: System.err: TypeError: application.start is not a function System.err: System.err: StackTrace: System.err: java.lang.RuntimeException: Unable to create application com.tns.NativeScriptApplication: com.tns.NativeScriptException: Error calling module function System.err: TypeError: application.start is not a function System.err: File: (file:///data/data/au.com.xxx.app/files/app/bundle.js:658:12) System.err: System.err: StackTrace: System.err: (file:///data/data/au.com.xxx.app/files/app/bundle.js:658:13) System.err: at ./main.ts(file:///data/data/au.com.xxx.app/files/app/bundle.js:664:30) System.err: at __webpack_require__(file: src\webpack\bootstrap:750:0) System.err: at checkDeferredModules(file: src\webpack\bootstrap:43:0) System.err: at webpackJsonpCallback(file: src\webpack\bootstrap:30:0) System.err: at (file:///data/data/au.com.xxx.app/files/app/bundle.js:2:57) System.err: at require(:1:266) System.err: System.err: System.err: TypeError: application.start is not a function System.err: at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6465) System.err: at android.app.ActivityThread.access$1300(ActivityThread.java:219) System.err: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1859) System.err: at android.os.Handler.dispatchMessage(Handler.java:107) System.err: at android.os.Looper.loop(Looper.java:214) System.err: at android.app.ActivityThread.main(ActivityThread.java:7356) System.err: at java.lang.reflect.Method.invoke(Native Method) System.err: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492) System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930) System.err: Caused by: com.tns.NativeScriptException: Error calling module function System.err: TypeError: application.start is not a function System.err: File: (file:///data/data/au.com.xxx.app/files/app/bundle.js:658:12) System.err: System.err: StackTrace: System.err: (file:///data/data/au.com.xxx.app/files/app/bundle.js:658:13) System.err: at ./main.ts(file:///data/data/au.com.xxx.app/files/app/bundle.js:664:30) System.err: at __webpack_require__(file: src\webpack\bootstrap:750:0) System.err: at checkDeferredModules(file: src\webpack\bootstrap:43:0) System.err: at webpackJsonpCallback(file: src\webpack\bootstrap:30:0) System.err: at (file:///data/data/au.com.xxx.app/files/app/bundle.js:2:57) System.err: at require(:1:266) System.err: System.err: System.err: TypeError: application.start is not a function System.err: at com.tns.Runtime.runModule(Native Method) System.err: at com.tns.Runtime.runModule(Runtime.java:674) System.err: at com.tns.Runtime.run(Runtime.java:666) System.err: at com.tns.NativeScriptApplication.onCreate(NativeScriptApplication.java:21) System.err: at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1182) System.err: at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6460) System.err: ... 8 more
内容的提问来源于stack exchange,提问作者Vishal Sahody
相关产品推荐
相关产品推荐

