alanhe421 / CodeTracker

:tada:a Wakatime client
http://1991421.cn/about
6 stars 0 forks source link

ionic build platform --prod error! #8

Closed alanhe421 closed 7 years ago

alanhe421 commented 7 years ago
[21:58:12]  ionic-app-script task: "build" 
[21:58:12]  Error: Cannot determine the module for class Footer in 
            /Users/heqiang/WebstormProjects/GITHUB/codetime/node_modules/ionic-angular/umd/components/toolbar/toolbar-footer.d.ts!
            Add Footer to the NgModule to fix it. Cannot determine the module for class Header in 
            /Users/heqiang/WebstormProjects/GITHUB/codetime/node_modules/ionic-angular/umd/components/toolbar/toolbar-header.d.ts!
            Add Header to the NgModule to fix it. Cannot determine the module for class Toolbar in 
            /Users/heqiang/WebstormProjects/GITHUB/codetime/node_modules/ionic-angular/umd/components/toolbar/toolbar.d.ts!
            Add Toolbar to the NgModule to fix it. Cannot determine the module for class ToolbarTitle in 
            /Users/heqiang/WebstormProjects/GITHUB/codetime/node_modules/ionic-angular/umd/components/toolbar/toolbar-title.d.ts!
            Add ToolbarTitle to the NgModule to fix it. Cannot determine the module for class Navbar in 
            /Users/heqiang/WebstormProjects/GITHUB/codetime/node_modules/ionic-angular/umd/components/navbar/navbar.d.ts!
            Add Navbar to the NgModule to fix it. Cannot determine the module for class Img in 
alanhe421 commented 7 years ago

solved! 下面是之前的错误代码

import {Page} from "ionic-angular/umd/navigation/nav-util";
rootPage: Page = WelcomePage;

注意变量是page组件的话,类型要是any,不能是Page。 修改为如下

rootPage: any = WelcomePage;