相关疑难解决方法(0)

组件是2个模块声明的一部分

我尝试构建一个离子2应用程序.当我在浏览器中使用离子服务器尝试应用程序或在模拟器上启动它时,一切正常.

但是当我每次尝试构建错误时

ionic-app-script tast: "build"
Error Type AddEvent in "PATH"/add.event.ts is part of the declarations of 2 modules: AppModule in "PATH"/app.modules.ts and AddEvent in "PATH"/add-event.module.ts.
Please consider moving AddEvent in "PATH"/add-event.ts to a higher module that imports AppModule in "PATH"/app.module.ts and AddEventModule.
You can also creat a new NgModule that exports and includes AddEvent then import that NgModule in AppModule and AddEventModule
Run Code Online (Sandbox Code Playgroud)

我的AppModule是

import { NgModule, ErrorHandler } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { IonicApp, IonicModule, …
Run Code Online (Sandbox Code Playgroud)

declaration build ionic2 ionic3 angular

100
推荐指数
5
解决办法
13万
查看次数

标签 统计

angular ×1

build ×1

declaration ×1

ionic2 ×1

ionic3 ×1