Javascriptservices: Property 'onError' does not exist on type '{}' on zone

Created on 16 Sep 2017  路  7Comments  路  Source: aspnet/JavaScriptServices

image

I am trying to use admin-lte but for some reason after updating the zone . I am not able to get this working . It gives me error as -

ERROR in [at-loader] ./ClientApp/boot.server.ts:25:18 
    TS2339: Property 'onError' does not exist on type '{}'.

My package.json -

"dependencies": {
    "@angular/animations": "4.4.1",
    "@angular/common": "4.4.1",
    "@angular/compiler": "4.4.1",
    "@angular/compiler-cli": "4.4.1",
    "@angular/core": "4.4.1",
    "@angular/forms": "4.4.1",
    "@angular/http": "4.4.1",
    "@angular/platform-browser": "4.4.1",
    "@angular/platform-browser-dynamic": "4.4.1",
    "@angular/platform-server": "4.4.1",
    "@angular/router": "4.4.1",
    "@ngtools/webpack": "1.7.1",
    "@types/webpack-env": "1.13.1",
    "angular2-template-loader": "0.6.2",
    "angular2-toaster": "^4.0.1",
    "aspnet-prerendering": "^3.0.1",
    "aspnet-webpack": "^2.0.1",
    "awesome-typescript-loader": "3.2.3",
    "bootstrap": "3.3.7",
    "css": "2.2.1",
    "css-loader": "0.28.7",
    "es6-shim": "0.35.3",
    "event-source-polyfill": "0.0.9",
    "expose-loader": "0.7.3",
    "extract-text-webpack-plugin": "3.0.0",
    "file-loader": "0.11.2",
    "font-awesome": "^4.7.0",
    "html-loader": "0.5.1",
    "isomorphic-fetch": "2.2.1",
    "jquery": "3.2.1",
    "json-loader": "0.5.7",
    "ngx-admin-lte": "^0.4.0",
    "preboot": "5.0.0",
    "raw-loader": "0.5.1",
    "reflect-metadata": "0.1.10",
    "rxjs": "5.4.3",
    "style-loader": "0.18.2",
    "to-string-loader": "1.1.5",
    "typescript": "2.5.2",
    "url-loader": "0.5.9",
    "webpack": "3.6.0",
    "webpack-hot-middleware": "2.19.1",
    "webpack-merge": "4.1.0",
    "zone.js": "0.8.17"
  },
  "devDependencies": {
    "@types/chai": "4.0.4",
    "@types/jasmine": "2.6.0",
    "@types/jquery": "^3.2.12",
    "chai": "4.1.2",
    "jasmine-core": "2.8.0",
    "karma": "1.7.1",
    "karma-chai": "0.1.0",
    "karma-chrome-launcher": "2.2.0",
    "karma-cli": "1.0.1",
    "karma-jasmine": "1.1.0",
    "karma-webpack": "2.0.4"
  }

Most helpful comment

Try defining the type explicitly on line 22:

const zone: NgZone = moduleRef.injector.get(NgZone);

Not sure if this is due to a change in Typescript 2.5.x or Angular. I see you've updated the versions from what the template uses.

All 7 comments

Try defining the type explicitly on line 22:

const zone: NgZone = moduleRef.injector.get(NgZone);

Not sure if this is due to a change in Typescript 2.5.x or Angular. I see you've updated the versions from what the template uses.

Worked for me

Thanks for the answer @oddeirik!

@oddeirik it worked for me too.
thanks!

it worked for me too!
great job!

same, worked for us too.

working here also ! thanks !

Was this page helpful?
0 / 5 - 0 ratings