2

I updated nativeScript, @angular/cli and @nativescript/schematics to their latest stable version. Generated a new project as:

ng new port --collection=@nativescript/schematics --shared --style=scss --prefix=port

followed by

tns run ios --bundle

Error:

***** Fatal JavaScript exception - application has been terminated. *****
Native stack trace:
1   0x10da0702e NativeScript::reportFatalErrorBeforeShutdown(JSC::ExecState*, JSC::Exception*, bool)
2   0x10da58f94 -[TNSRuntime executeModule:referredBy:]
3   0x10d2f50b3 main
4   0x7fff51a231fd start
5   0x1
JavaScript stack trace:
file: node_modules/@nativescript/angular/__ivy_ngcc__/zone-js/dist/zone-nativescript.js:32:0
at file: node_modules/@nativescript/angular/__ivy_ngcc__/zone-js/dist/zone-nativescript.js:645:1
at file: node_modules/@nativescript/angular/__ivy_ngcc__/zone-js/dist/zone-nativescript.js:9:61
at file: node_modules/@nativescript/angular/__ivy_ngcc__/zone-js/dist/zone-nativescript.js:12:1
at ../node_modules/@nativescript/angular/__ivy_ngcc__/zone-js/dist/zone-nativescript.js(file:///app/vendor.js:103073:34)
at __webpack_require__(file: src/webpack/bootstrap:752:0)
at fn(file: src/webpack/bootstrap:120:0)
at file: node_modules/@nativescript/angular/__ivy_ngcc__/platform-common.js:6:8
at ../node_modules/@nativescript/angular/__ivy_ngcc__/platform-common.js(file:///app/vendor.js:97913:34)
at __webpack_require__(file: src/webpack/bootstrap:752:0)
at fn(file: src/webpack/bootstrap:120:0)
at ../node_modules/@nativescript/angular/__ivy_ngcc__/index.js(file: node_modules/@nativescript/angular/__ivy_ngcc__/index.js:6:17)
at __webpack_require__(file: src/webpack/bootstrap:752:0)
at fn(file: src/webpack/bootstrap:120:0)
at ./app/app.module.tns.ts(file: src/app/app.module.tns.ts:1:0)
at __webpack_require__(file: src/webpack/bootstrap:752:0)
at fn(file: src/webpack/bootstrap:120:0)
at file:///app/bundle.js:240:96
at ./main.tns.ts(file:///app/bundle.js:298:34)
at __webpack_require__(fi<…>
JavaScript error:
file: node_modules/@nativescript/angular/__ivy_ngcc__/zone-js/dist/zone-nativescript.js:32:0: JS ERROR Error: Zone already loaded.
(CoreFoundation) *** Terminating app due to uncaught exception 'NativeScript encountered a fatal error: Error: Zone already loaded
  • 1
    We did encounter this problem as well today. The Angular 9/NativeScript combo doesn't work too well right now. – Timo Jul 07 '20 at 18:05
  • @Timo yeah, its a PIA as of now. Haven't updated since I last did, though `ncu -g` lists `@nativescript/schematics` at v10.0.1, and `nativescript` at v6.8.0 ... but I'm good for now. – Gaurav Sharma Jul 31 '20 at 20:38

1 Answers1

0

the many issue with nativescript angular9 and ivy. but to fix this error just use zone.js 0.9.1

miladfm
  • 1,508
  • 12
  • 20
  • Does it work? I haven't tried yet, but thanks for the tip. I'm good for now, after working around the copy plugin and a few corrections to the package.json – Gaurav Sharma Jul 31 '20 at 20:34