Skip to content

"Error: Zone already loaded" after running "tns run android --bundle" on empty project #285

@juangranados

Description

@juangranados

Environment
{
"name": "Test",
"license": "SEE LICENSE IN ",
"version": "0.0.0",
"nativescript": {
"id": "org.nativescript.test",
"tns-android": {
"version": "6.5.1"
}
},
"dependencies": {
"@angular/animations": "~9.1.0",
"@angular/common": "~9.1.0",
"@angular/compiler": "~9.1.0",
"@angular/core": "~9.1.0",
"@angular/forms": "~9.1.0",
"@angular/platform-browser": "~9.1.0",
"@angular/platform-browser-dynamic": "~9.1.0",
"@angular/router": "~9.1.0",
"@nativescript/angular": "~9.0.0",
"@nativescript/core": "~6.5.5",
"@nativescript/schematics": "git+https://github.com/NativeScript/nativescript-schematics.git",
"@nativescript/theme": "~2.2.1",
"reflect-metadata": "~0.1.12",
"rxjs": "~6.5.5",
"tslib": "1.10.0",
"zone.js": "~0.10.2"
},
"devDependencies": {
"@angular/cli": "~9.1.0",
"@angular/compiler-cli": "~9.1.0",
"@angular-devkit/core": "~9.1.0",
"nativescript-dev-webpack": "~1.5.0",
"@ngtools/webpack": "~9.1.0",
"typescript": "~3.8.3",
"node-sass": "^4.7.1"
}
}

Describe the bug
After run tns run android --bundle

Successfully synced application org.nativescript.test on device emulator-5554. System.err: An uncaught Exception occurred on "main" thread. System.err: Unable to create application com.tns.NativeScriptApplication: com.tns.NativeScriptException: Error calling module function System.err: Error: Zone already loaded. System.err: File: (file: node_modules\@nativescript\angular\__ivy_ngcc__\zone-js\dist\zone-nativescript.js:32:0) System.err: System.err: StackTrace: System.err: ZoneAwareError(file: node_modules\@nativescript\angular\zone-js\dist\zone-nativescript.js:1298:0) System.err: at (file: node_modules\@nativescript\angular\__ivy_ngcc__\zone-js\dist\zone-nativescript.js:32:0) System.err: at (file: node_modules\@nativescript\angular\__ivy_ngcc__\zone-js\dist\zone-nativescript.js:645:1) System.err: at (file: node_modules\@nativescript\angular\__ivy_ngcc__\zone-js\dist\zone-nativescript.js:9:61) System.err: at (file: node_modules\@nativescript\angular\__ivy_ngcc__\zone-js\dist\zone-nativescript.js:12:1) System.err: at ../node_modules/@nativescript/angular/__ivy_ngcc__/zone-js/dist/zone-nativescript.js(file:///data/data/org.nativescript.test/files/app/vendor.js:103073:30) System.err: at __webpack_require__(file: app\webpack\bootstrap:750:0) System.err: at fn(file: app\webpack\bootstrap:120:0) System.err: at (file: node_modules\@nativescript\angular\__ivy_ngcc__\platform-common.js:6:0) System.err: at ../node_modules/@nativescript/angular/__ivy_ngcc__/platform-common.js(file:///data/data/org.nativescript.test/files/app/vendor.js:97913:30) System.err: at __webpack_require__(file: app\webpack\bootstrap:750:0) System.err: at fn(file: app\webpack\bootstrap:120:0) System.err: at ../node_modules/@nativescript/angular/__ivy_ngcc__/index.js(file: node_modules\@nativescript\angular\__ivy_ngcc__\index.js:6:9) System.err: at __webpack_require__(file: app\webpack\bootstrap:750:0) System.err: at fn(file: app\webpack\bootstrap:120:0) System.err: at ./app.module.ts(file: app\app.module.ts:1:0) System.err: at __webpack_require__(file: app\webpack\bootstrap:750:0) System.err: at fn(file: app\webpack\bootstrap:120:0) System.err: at (file:///data/data/org.nativescript.test/files/app/bundle.js:195:69) System.err: at ./main.ts(file:///data/data/org.nativescript.test/files/app/bundle.js:254:30) System.err: at __webpack_require__(file: app\webpack\bootstrap:750:0) System.err: at checkDeferredModules(file: app\webpack\bootstrap:43:0) System.err: at webpackJsonpCallback(file: app\webpack\bootstrap:30:0) System.err: at (file:///data/data/org.nativescript.test/files/app/bundle.js:2:57) System.err: at require(:1:266)

To Reproduce

  1. Create new project: ng new --collection=@nativescript/schematics test --style=scss
  2. Run project: tns run android --bundle

Expected behavior
Project running normally

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions