Ionic framework 如何解决:无法确定OverlyPortal类的模块
我面临以下问题:如果我尝试使用Ionic framework 如何解决:无法确定OverlyPortal类的模块,ionic-framework,ionic3,Ionic Framework,Ionic3,我面临以下问题:如果我尝试使用--prod标志为ios构建Ionic 3应用程序,我会遇到以下错误: typescript error Cannot determine the module for class OverlayPortal in C:/.../node_modules/ionic-angular/umd/components/app/overlay-portal.d.ts! Add OverlayPortal to the NgModule to fix it. Cannot d
--prod
标志为ios构建Ionic 3应用程序,我会遇到以下错误:
typescript error
Cannot determine the module for class OverlayPortal in
C:/.../node_modules/ionic-angular/umd/components/app/overlay-portal.d.ts!
Add OverlayPortal to the NgModule to fix it. Cannot determine the module for class IonicApp in
C:/.../node_modules/ionic-angular/umd/components/app/app-root.d.ts!
Add IonicApp to the NgModule to fix it. Cannot determine the module for class ClickBlock in
C:/.../node_modules/ionic-angular/umd/components/app/click-block.d.ts!
Add ClickBlock to the NgModule to fix it.
使用的生成命令:
ionic cordova build ios --prod
如果我在构建时未使用
--prod
标志,或者如果我使用离子服务
,则不会出现错误。我没有在我的代码中使用错误消息中提到的任何类。我通过搜索我的代码并删除对Ionics页面
类的任何引用来解决问题,这是建议的
示例:翻转让页面:第页编码>进入让页面代码>
还要确保删除页面
类的任何导入,可能如下所示:
import { Page } from 'ionic-angular/umd/navigation/nav-util';