Unhandled promise rejection Error: Zone.js #12
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Unhandled promise rejection Error: Zone.js has detected that ZoneAwarePromise
(window|global).Promise
has been overwritten.Most likely cause is that a Promise polyfill has been loaded after Zone.js (Polyfilling Promise api is not necessary when zone.js is loaded. If you must load one, do so before loading zone.js.)
at Function.webpackJsonp.../../../../zone.js/dist/zone.js.Zone.assertZonePatched (zone.js:44)
at new NgZone (core.es5.js:3775)
at PlatformRef_.webpackJsonp.../../../core/@angular/core.es5.js.PlatformRef_._bootstrapModuleFactoryWithZone (core.es5.js:4491)
at core.es5.js:4536
at run (es6.promise.js:108)
at es6.promise.js:119
at MutationObserver.flush ($.microtask.js:19)
at ZoneDelegate.webpackJsonp.../../../../zone.js/dist/zone.js.ZoneDelegate.invoke (zone.js:391)
at Zone.webpackJsonp.../../../../zone.js/dist/zone.js.Zone.runGuarded (zone.js:154)
at MutationObserver. (zone.js:132)
When my Angular app start with in function just
Equation.solve('4 * lg(4) ^ 3')
import
equations
beforezone
It is just before zone this is my package,json
{
"name": "my-app",
"version": "0.0.0",
"license": "MIT",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e"
},
"private": true,
"dependencies": {
"@angular/animations": "^4.2.6",
"@angular/common": "^4.2.6",
"@angular/compiler": "^4.2.6",
"@angular/core": "^4.2.6",
"@angular/forms": "^4.2.6",
"@angular/http": "^4.2.6",
"@angular/platform-browser": "^4.2.6",
"@angular/platform-browser-dynamic": "^4.2.6",
"@angular/router": "^4.2.6",
"bootstrap": "^3.3.7",
"core-js": "^2.4.1",
"equations": "^1.3.6",
"ng2-bootstrap-modal": "^1.0.1",
"ng2-dnd": "^4.2.0",
"rxjs": "^5.4.2",
"select2": "^4.0.3",
"zone": "^0.3.4",
"zone.js": "^0.8.12"
},
"devDependencies": {
"@angular/cli": "^1.2.0",
"@angular/compiler-cli": "^4.2.6",
"@types/jasmine": "2.5.53",
"@types/jquery": "^3.2.6",
"@types/jqueryui": "^1.11.34",
"@types/node": "^8.0.10",
"@types/select2": "^4.0.37",
"babel": "^6.23.0",
"babel-core": "^6.25.0",
"codelyzer": "~3.1.2",
"jasmine-core": "~2.6.4",
"jasmine-spec-reporter": "^4.1.1",
"karma": "~1.7.0",
"karma-chrome-launcher": "~2.2.0",
"karma-cli": "~1.0.1",
"karma-coverage-istanbul-reporter": "^1.3.0",
"karma-jasmine": "~1.1.0",
"karma-jasmine-html-reporter": "^0.2.2",
"protractor": "~5.1.2",
"ts-node": "~3.2.0",
"tslint": "~5.5.0",
"typescript": "~2.4.1"
}
}
I mean in your code, import
equations
first.this should be the first line of your code:
hi @mdibaiee
I put import { Equation } from "equations"; at first line of my app.component.ts file but do the same
@Toso82 from what I understand of that error, Zone.js is asking you to import
equations
beforezone
@mdibaiee ok but i want to use this on angular 4 application. Import equations is on top and I don't impor in this module zone in app.component.ts
import { Equation } from "equations";
import { Component, OnInit, OnChanges, LOCALE_ID, Inject } from '@angular/core';
import { Subject } from './Model/mca.subject'
import { Comparabile } from './Model/mca.comparabile'
import { CaratteristicheService } from './caratteristiche.service'
import { Caratteristica, CaratteristicaInfo,TipoStima} from "./Model/mca.caratteristica";
import { Observable } from "rxjs/Observable";
import { DecimalPipe } from '@angular/common'
import { DialogService } from "ng2-bootstrap-modal";
import { EditCaratteristicheDialogComponent } from "app/component/edit-caratteristiche-dialog/edit-caratteristiche-dialog.component";
I don't know how to put before
@Toso82: Sorry, I really have no idea, maybe TypeScript is importing zone