Search code examples
javascriptiosmobilenativescriptnativescript-vue

NativeScript encountered a fatal error: Uncaught ReferenceError: __UI_USE_EXTERNAL_RENDERER__ is not defined


For some reason I get this error when I'm building on iOS on my mac.

***** Fatal JavaScript exception - application has been terminated. ***** 
NativeScript encountered a fatal error: Uncaught ReferenceError: __UI_USE_EXTERNAL_RENDERER__ is not defined
at
(file: src/packages/core/bundle-entry-points.ts:7:0)
at ../node_modules/@nativescript/core/bundle-entry-points.js(file:///app/vendor.js:2442:30)
at __webpack_require__(file: src/webpack/bootstrap:816:0)
at fn(file: src/webpack/bootstrap:120:0)
at (file: src/main.ts:1:35)
at ./main.ts(file:///app/bundle.js:6855:30)
at __webpack_require__(file: src/webpack/bootstrap:816:0)
at checkDeferredModules(file: src/webpack/bootstrap:43:0)
at webpackJsonpCallback(file: src/webpack/bootstrap:30:0)
at (file:///app/bundle.js:2:57)
at require(:1:137)
(CoreFoundation) *** Terminating app due to uncaught exception 'NativeScript encountered a fatal error: Uncaught ReferenceError: __UI_USE_EXTERNAL_RENDERER__ is not defined
at
(file: src/packages/core/bundle-entry-points.ts:7:0)
at ../node_modules/@nativescript/core/bundle-entry-points.js(file:///app/vendor.js:2442:30)
at __webpack_require__(file: src/webpack/bootstrap:816:0)
at fn(file: src/webpack/bootstrap:120:0)
at (file: src/main.ts:1:35)
at ./main.ts(file:///app/bundle.js:6855:30)
at __webpack_require__(file: src/webpack/bootstrap:816:0)
at checkDeferredModules(file: src/webpack/bootstrap:43:0)
at webpackJsonpCallback(file: src/webpack/bootstrap:30:0)
at (file:///app/bundle.js:2:57)
at require(:1:137)
', reason: '(null)'
*** First throw call stack:
(
0   CoreFoundation                      0x00007fff20422fba __exceptionPreprocess + 242
1   libobjc.A.dylib                     0x00007fff20193ff5 objc_exception_throw + 48
2   NativeScript                        0x0000000106c2d914 _ZN3tns21NativeScriptException15OnUncaughtErrorEN2v8<…>

Yesterday it worked perfectly fine, so I'm kind of surprised to see an error. I tried cleaning the platforms and upgrading to a newer version, but nothing works.

Nothing has changed for as much as I know.

I also tried testing it with other branches, and even there I get this error.

Any suggestions?


Solution

  • Maybe is a problem with your version of @nativescript/webpack, if you migrated to NativeScript 8.1 you should update your version of @nativescript/webpack to 5.0.0 as pointed here