首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >IDBIndex错误ReferenceError:找不到变量: NATIVESCRIPT

IDBIndex错误ReferenceError:找不到变量: NATIVESCRIPT
EN

Stack Overflow用户
提问于 2020-01-08 15:48:35
回答 1查看 1K关注 0票数 1

我试图创建一个angular-nativescript共享应用程序,但是当我尝试为IOS构建时,我得到了以下错误。

我在我的web应用中使用了firebase,但是我还没有为移动设备安装一个nativescript-firebase插件。

代码语言:javascript
复制
    ***** 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:
EN

回答 1

Stack Overflow用户

发布于 2020-01-22 12:59:43

面临着几乎类似的问题。

JS ERROR ReferenceError: Can't find variable: TKListViewDelegate

这发生在tns plugin add nativescript-ui-listview和将RadListView添加到模板之后。

在android上构建得很好,但当尝试在IOS上构建时,发生了以下情况:

代码语言:javascript
复制
***** 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:

创建PR的Github Issue raisedFixed the issue in release 6.3

可在此处获得:Release 6.3.2

安装了最新版本:tns update更新了项目:npm install -g nativescript

错误反复出现,在归档中找到此讨论:Slack Conversations on the issue

之后,npm install tns-core-modules@rc

错误已不复存在...

很高兴为您效劳,

马卡武拉。

票数 -1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/59641494

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档