Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ionic-framework/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ionic framework 如何解决:无法确定OverlyPortal类的模块_Ionic Framework_Ionic3 - Fatal编程技术网

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';