我将 nativescript 5.1.1 与 android 版本 5.1.0 和 ios 版本 5.1.1 一起使用。当应用程序在 ios 上启动时,它立即崩溃并出现以下错误:JavaScript 堆栈跟踪:
1 _reportError@file:///app/tns_modules/@angular/compiler/bundles/compiler.umd.js:19223:31 2 @file:///app/tns_modules/@angular/compiler/bundles/compiler.umd。 js:19072:43 3 forEach@[native code] 4 _getProvidersMetadata@file:///app/tns_modules/@angular/compiler/bundles/compiler.umd.js:19057:30 5 getNgModuleMetadata@file:///app/ tns_modules/@angular/compiler/bundles/compiler.umd.js:18776:84 6 _loadModules@file:///app/tns_modules/@angular/compiler/bundles/compiler.umd.js:26060:74 7 _compileModuleAndComponents@file :///app/tns_modules/@angular/compiler/bundles/compiler.umd.js:26041:52 8 compileModuleAsync@file:///app/tns_modules/@angular/compiler/bundles/compiler.umd.js:26001 :68 9 bootstrapModule@file:///app/tns_modules/@angular/core/bundles/core.umd.js:17836:42 10 _bootstrapper@file:///app/tns_modules/nativescript-angular/platform-common.js:87:50 11 @file:///app/tns_modules/nativescript-angular/platform-common.js:150:32 12 notify@file:/ //app/tns_modules/tns-core-modules/data/observable/o<…>
JavaScript 错误:file:///app/tns_modules/@angular/compiler/bundles/compiler.umd.js:19223:31:JS 错误错误:遇到未定义的提供者!通常这意味着你有一个循环依赖。这可能是由于使用 'barrel' index.ts 文件造成的。
此外,当从设备查看控制台时,我看到了这一点。[19-02-08 11:56:23.932] (CLI) (node:39256) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'pipe' of undefined at WebSocketServer.server.on (/usr/local/lib/node_modules/nativescript/ lib/device-sockets/ios/app-debug-socket-proxy-factory.js:124:32) 在 webSocketServer.emit (events.js:182:13) 在 handleUpgrade (/usr/local/lib/node_modules/nativescript /node_modules/ws/lib/websocket-server.js:79:18) 在 WebSocketServer.completeUpgrade (/usr/local/lib/node_modules/nativescript/node_modules/ws/lib/websocket-server.js:293:5) 在options.verifyClient (/usr/local/lib/node_modules/nativescript/node_modules/ws/lib/websocket-server.js:210:16)
这似乎不在我的模块中,因为它在 Android 中正常运行。
我主要是在调试问题时寻求一些帮助。我没有办法调试被推送到模拟器或手机的动态代码。