[英]NATIVESCRIPT ERROR ReferenceError: Can't find variable: IDBIndex
I tried to create an angular-nativescript shared app but when I try to build for IOS I get the following error.我尝试创建一个 angular-nativescript 共享应用程序,但是当我尝试为 IOS 构建时,出现以下错误。
I use firebase in my web app but I don't have a nativescript-firebase plugin installed for mobile.我在我的网络应用程序中使用了 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:
Facing an almost similar issue.面临几乎类似的问题。
JS ERROR ReferenceError: Can't find variable: TKListViewDelegate
This happened after tns plugin add nativescript-ui-listview
and adding a RadListView to a template.这发生在tns plugin add nativescript-ui-listview
并将 RadListView 添加到模板之后。
Builds well on android, but when trying to build on IOS, this happened:在 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:
Github Issue raised a PR was created: Fixed the issue in release 6.3 Github 问题引发了 PR 已创建:修复了 6.3 版中的问题
Available here: Release 6.3.2可在此处获得: 6.3.2 版
Installed the latest release: npm install -g nativescript
Updated the project: tns update
安装最新版本: npm install -g nativescript
更新项目: tns update
Error was recurrent, Found this discussion in the archives: Slack Conversations on the issue错误反复出现,在档案中找到了这个讨论: 关于这个问题的 Slack Conversations
After, npm install tns-core-modules@rc
之后, npm install tns-core-modules@rc
Error was no more...错误不再...
Glad to be of service,很高兴为您服务,
Makavura.马卡武拉。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.