2016-11-26 126 views
1

導出的IonicErrorHandler符號我想查看IonicErrorHandler對我有用的方式。所以我說這對我的app.components.ts無法找到從模塊

import { NgModule, ErrorHandler } from '@angular/core'; 
import { IonicApp, IonicModule ,IonicErrorHandler} from 'ionic-angular'; 

這頂在底部

providers: [{provide: ErrorHandler, useClass: IonicErrorHandler}] 

但我得到了建築這個錯誤。

ngc error: Error: can't find symbol IonicErrorHandler exported from module /node_modules/ionic-angular/index.d.ts, resolving symbol AppModule in /.tmp/app/app.module.ts, resolving symbol AppModule in /.tmp/app/app.module.ts

回答

0

我解決了這個問題,卸載並重新安裝新的離子和cordova。

npm uninstall ionic cordova 
npm install -g ionic cordova