[我试图创建一个angular-nativescript共享应用程序,但是当我尝试为IOS构建时,出现以下错误。
我在Web应用程序中使用了Firebase,但没有为移动设备安装nativescript-firebase插件。
***** Fatal JavaScript exception - application has been terminated. *****
Native stack trace:
1 0x107779bce NativeScript::reportFatalErrorBeforeShutdown(JSC::ExecState*, JSC::Exception*, bool)
2 0x1077c8824 -[TNSRuntime executeModule:referredBy:]
3 0x1070b90f3 main
4 0x7fff5227ec25 start
5 0x1
JavaScript stack trace:
../node_modules/idb/lib/idb.mjs(file:///node_modules/idb/lib/idb.mjs:87:0)
at __webpack_require__(file:///src/webpack/bootstrap:750:0)
at fn(file:///src/webpack/bootstrap:120:0)
at ../node_modules/@firebase/installations/dist/index.esm.js(file:///node_modules/@firebase/installations/dist/index.esm.js:1:0)
at __webpack_require__(file:///src/webpack/bootstrap:750:0)
at fn(file:///src/webpack/bootstrap:120:0)
at ../node_modules/@firebase/performance/dist/index.esm.js(file:///node_modules/@firebase/performance/dist/index.esm.js:1:0)
at __webpack_require__(file:///src/webpack/bootstrap:750:0)
at fn(file:///src/webpack/bootstrap:120:0)
at ../node_modules/firebase/dist/index.esm.js(file:///node_modules/firebase/dist/index.esm.js:1:0)
at __webpack_require__(file:///src/webpack/bootstrap:750:0)
at fn(file:///src/webpack/bootstrap:120:0)
at ./app/components/sign-up/sign-up.component.ts(file:///app/bundle.js:1898:85)
at __webpack_require__(file:///src/webpack/bootstrap:750:0)
at fn(file:///src/webpack/bootstrap:120:0)
at ./app/app.routes.ts(file:///src/app/app.routes.ts:3:0)
at __webpack_require__(file:///src/webpack/bootstrap:750:0)
at fn(file:///src/webpack/bootstrap:120:0)
at .<…>
JavaScript error:
file:///node_modules/idb/lib/idb.mjs:87:0: JS ERROR ReferenceError: Can't find variable: IDBIndex
(CoreFoundation) *** Terminating app due to uncaught exception 'NativeScript encountered a fatal error: ReferenceError: Can't find variable: IDBIndex
at
../node_modules/idb/lib/idb.mjs(file:///node_modules/idb/lib/idb.mjs:87:0)
at __webpack_require__(file:///src/webpack/bootstrap:750:0)
at fn(file:///src/webpack/bootstrap:120:0)
at ../node_modules/@firebase/installations/dist/index.esm.js(file:///node_modules/@firebase/installations/dist/index.esm.js:1:0)
at __webpack_require__(file:///src/webpack/bootstrap:750:0)
at fn(file:///src/webpack/bootstrap:120:0)
at ../node_modules/@firebase/performance/dist/index.esm.js(file:///node_modules/@firebase/performance/dist/index.esm.js:1:0)
at __webpack_require__(file:///src/webpack/bootstrap:750:0)
at fn(file:///src/webpack/bootstrap:120:0)
at ../node_modules/firebase/dist/index.esm.js(file:///node_modules/firebase/dist/index.esm.js:1:0)
at __webpack_require__(file:///src/webpack/bootstrap:750:0)
at fn(file:///src/webpack/bootstrap:120:0)
at ./app/components/sign-up/sign-up.component.ts(file:///app/bundle.js:1898:85)
at __webpack_require__(file:///src/webpack/bootstrap:750:0)
at fn(file:///src/webpack/bootstrap:120:0)
at ./app/ap<…>
NativeScript caught signal 6.
Native Stack:
1 0x1077c7481 sig_handler(int)
2 0x7fff5245b42d _sigtramp
3 0x1
4 0x7fff5234ba5c abort
5 0x7fff502497f8 __cxa_bad_cast
6 0x7fff502499c7 demangling_unexpected_handler()
7 0x7fff513fbd7c _objc_terminate()
8 0x7fff50256e97 std::__terminate(void (*)())
9 0x7fff502568fe __cxa_get_exception_ptr
10 0x7fff502568c5 __cxxabiv1::exception_cleanup_func(_Unwind_Reason_Code, _Unwind_Exception*)
11 0x7fff513fbc44 _objc_exception_destructor(void*)
12 0x10777a0fd NativeScript::reportFatalErrorBeforeShutdown(JSC::ExecState*, JSC::Exception*, bool)
13 0x1077c8824 -[TNSRuntime executeModule:referredBy:]
14 0x1070b90f3 main
15 0x7fff5227ec25 start
16 0x1
JS Stack:
面对几乎类似的问题。
JS ERROR ReferenceError: Can't find variable: TKListViewDelegate
[在tns plugin add nativescript-ui-listview
并将RadListView添加到模板后发生。
在android上构建良好,但是尝试在IOS上构建时,发生了这种情况:
***** Fatal JavaScript exception - application has been terminated. *****
Native stack trace:
1 0x10b3fdbce NativeScript::reportFatalErrorBeforeShutdown(JSC::ExecState*, JSC::Exception*, bool)
2 0x10b44c824 -[TNSRuntime executeModule:referredBy:]
3 0x10ad2f103 main
4 0x10e716c25 start
5 0x1
JavaScript stack trace:
file:///node_modules/nativescript-ui-listview/ui-listview.js:558:0
at ../node_modules/nativescript-ui-listview/ui-listview.js(file:///node_modules/nativescript-ui-listview/ui-listview.js:560:1)
at __webpack_require__(file:///src/webpack/bootstrap:750:0)
at fn(file:///src/webpack/bootstrap:120:0)
at ../node_modules/nativescript-ui-listview/angular/listview-directives.js(file:///node_modules/nativescript-ui-listview/angular/listview-directives.js:5:18)
at __webpack_require__(file:///src/webpack/bootstrap:750:0)
at fn(file:///src/webpack/bootstrap:120:0)
at ./app/app.module.ts(file:///src/app/app.module.ts:1:0)
at __webpack_require__(file:///src/webpack/bootstrap:750:0)
at fn(file:///src/webpack/bootstrap:120:0)
at file:///app/bundle.js:966:92
at ./main.ts(file:///app/bundle.js:1017:34)
at __webpack_require__(file:///src/webpack/bootstrap:750:0)
at checkDeferredModules(file:///src/webpack/bootstrap:43:0)
at webpackJsonpCallback(file:///src/webpack/bootstrap:30:0)
at anonymous(file:///app/bundle.js:2:61)
at evaluate([native code])
at moduleEvaluation([native code])
at [native code]
at asyncFunctionResume([native code])
at [native code]
at promiseReactionJob([native code])
JavaScript error:
file:///node_modules/nativescript-ui-listview/ui-listview.js:558:0: JS ERROR ReferenceError: Can't find variable: TKListViewDelegate
(CoreFoundation) *** Terminating app due to uncaught exception 'NativeScript encountered a fatal error: ReferenceError: Can't find variable: TKListViewDelegate
at
file:///node_modules/nativescript-ui-listview/ui-listview.js:558:0
at ../node_modules/nativescript-ui-listview/ui-listview.js(file:///node_modules/nativescript-ui-listview/ui-listview.js:560:1)
at __webpack_require__(file:///src/webpack/bootstrap:750:0)
at fn(file:///src/webpack/bootstrap:120:0)
at ../node_modules/nativescript-ui-listview/angular/listview-directives.js(file:///node_modules/nativescript-ui-listview/angular/listview-directives.js:5:18)
at __webpack_require__(file:///src/webpack/bootstrap:750:0)
at fn(file:///src/webpack/bootstrap:120:0)
at ./app/app.module.ts(file:///src/app/app.module.ts:1:0)
at __webpack_require__(file:///src/webpack/bootstrap:750:0)
at fn(file:///src/webpack/bootstrap:120:0)
at file:///app/bundle.js:966:92
at ./main.ts(file:///app/bundle.js:1017:34)
at __webpack_require__(file:///src/webpack/bootstrap:750:0)
at checkDeferredModules(file:///src/webpack/bootstrap:43:0)
at webpackJsonpCallback(file:///src/webpack/bootstrap:30:0)
at anonymous(file:///app/bundle.js:2:61)
at evaluate([native code])
at <…>
NativeScript caught signal 6.
Native Stack:
1 0x10b44b481 sig_handler(int)
2 0x10eaf942d _sigtramp
3 0x10b35e4f9
4 0x10e83da5c abort
5 0x10e5537f8 __cxa_bad_cast
6 0x10e5539c7 demangling_unexpected_handler()
7 0x10dab9d7c _objc_terminate()
8 0x10e560e97 std::__terminate(void (*)())
9 0x10e5608fe __cxa_get_exception_ptr
10 0x10e5608c5 __cxxabiv1::exception_cleanup_func(_Unwind_Reason_Code, _Unwind_Exception*)
11 0x10dab9c44 _objc_exception_destructor(void*)
12 0x10b3fe0fd NativeScript::reportFatalErrorBeforeShutdown(JSC::ExecState*, JSC::Exception*, bool)
13 0x10b44c824 -[TNSRuntime executeModule:referredBy:]
14 0x10ad2f103 main
15 0x10e716c25 start
16 0x1
JS Stack:
在此可用:Release 6.3.2
安装了最新版本:npm install -g nativescript
更新了项目:tns update
错误屡见不鲜,在档案中找到了此讨论:Slack Conversations on the issue
npm install tns-core-modules@rc
不再是错误...
非常高兴,
Makavura。