ionic-team / ionic-app-scripts

App Build Scripts for Ionic Projects
http://ionicframework.com/
MIT License
608 stars 304 forks source link

build platform --prod has error #904

Closed alanhe421 closed 7 years ago

alanhe421 commented 7 years ago

package.json

"dependencies": {
    "@angular/common": "4.0.0",
    "@angular/compiler": "4.0.0",
    "@angular/compiler-cli": "4.0.0",
    "@angular/core": "4.0.0",
    "@angular/forms": "4.0.0",
    "@angular/http": "4.0.0",
    "@angular/platform-browser": "4.0.0",
    "@angular/platform-browser-dynamic": "4.0.0",
    "@angular/platform-server": "4.0.0",
    "@ionic-native/app-version": "^3.4.4",
    "@ionic-native/core": "3.4.2",
    "@ionic-native/in-app-browser": "3.4.2",
    "@ionic-native/splash-screen": "3.4.2",
    "@ionic-native/status-bar": "3.4.2",
    "@ionic/storage": "2.0.1",
    "@ngx-translate/core": "^6.0.1",
    "angular2-jwt": "^0.1.27",
    "auth0-lock": "^10.14.0",
    "echarts": "^3.5.1",
    "ionic-angular": "3.0.1",
    "ionicons": "3.0.0",
    "js-base64": "^2.1.9",
    "moment": "^2.18.1",
    "rxjs": "5.0.1",
    "sw-toolbox": "3.4.0",
    "zone.js": "0.7.2"
  },
  "devDependencies": {
    "@ionic/app-scripts": "1.3.3",
    "typescript": "~2.2.1"
  },

ionic -v 2.2.1 cordova -v 6.5.0


if add --prod,build fail and error

[08:58:09]  ionic-app-script task: "build" 
[08:58:09]  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 
            /Users/heqiang/WebstormProjects/GITHUB/codetime/node_modules/ionic-angular/umd/components/img/img.d.ts! Add 
            Img to the NgModule to fix it. Cannot determine the module for class SplitPane in 

if not add,is okay!

danbucholtz commented 7 years ago

More than likely you need to import the IonicModule into your app's NgModule. If that doesn't work, please let me know how to recreate the issue.

Thanks, Dan