无法找到从模块
问题描述:
导出的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
答
我解决了这个问题,卸载并重新安装新的离子和cordova。
npm uninstall ionic cordova
npm install -g ionic cordova