ОШИБКА NATIVESCRIPT ReferenceError: Не удается найти переменную: IDBIndex - PullRequest
1 голос
/ 08 января 2020

Я пытался создать общее приложение с angular -nativescript, но при попытке создать для IOS я получаю следующую ошибку.

Я использую 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:

1 Ответ

0 голосов
/ 22 января 2020

Столкнулся с почти аналогичной проблемой.

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:

Github Проблема поднята PR был создан: Исправлена ​​проблема в выпуске 6.3

Доступно здесь: Выпуск 6.3.2

Установлен последний выпуск: npm install -g nativescript Обновлен проект: tns update

Ошибка повторяется, Обнаружено это обсуждение в архивах: Slack Беседы по вопросу

После, npm install tns-core-modules@rc

Ошибка больше не была ...

Рад быть полезным,

Makavura.

...