ionic-team / ionic-framework

A powerful cross-platform UI toolkit for building native-quality iOS, Android, and Progressive Web Apps with HTML, CSS, and JavaScript.
https://ionicframework.com
MIT License
51.07k stars 13.51k forks source link

Slow compilation after upgrade from beta.11 to 4.0.0-beta.12 #15844

Closed alan-albuquerque closed 5 years ago

alan-albuquerque commented 6 years ago

Bug Report

Ionic Info Run ionic info from a terminal/cmd prompt and paste the output below.

Ionic:

   ionic (Ionic CLI)          : 4.1.2 (/home/alan/.nvm/versions/node/v8.11.1/lib/node_modules/ionic)
   Ionic Framework            : @ionic/angular 4.0.0-beta.12
   @angular-devkit/core       : 0.9.0-beta.3
   @angular-devkit/schematics : 0.9.0-beta.3
   @angular/cli               : 6.2.4
   @ionic/ng-toolkit          : 1.1.0
   @ionic/schematics-angular  : 1.0.7

Cordova:

   cordova (Cordova CLI) : 8.0.0
   Cordova Platforms     : android 7.0.0
   Cordova Plugins       : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 2.1.4, (and 5 other plugins)

System:

   Android SDK Tools : 26.1.1 (/home/alan/Android/Sdk)
   NodeJS            : v8.11.1 (/home/alan/.nvm/versions/node/v8.11.1/bin/node)
   npm               : 6.4.1
   OS                : Linux 4.15

Describe the Bug

After upgrading from version 4.0.0-beta.11 to 4.0.0-beta.12 the build became very slow, from approximately 5 seconds to approximately 65 seconds.

Steps to Reproduce Steps to reproduce the behavior:

  1. Create a project with version beta.11
  2. upgrade to 4.0.0-beta.12
  3. run "ionic serve"

Additional Context package.json

{
  "name": "oh-my-bread",
  "version": "2.0.0-DEV",
  "author": "Ionic Framework",
  "homepage": "http://ionicframework.com/",
  "scripts": {
    "ng": "ng",
    "start": "ionic serve",
    "build": "ng build",
    "test": "ng test",
    "lint": "ng lint",
    "e2e": "ng e2e"
  },
  "private": true,
  "akitaCli": {
    "customFolderName": "true",
    "isAngular": true,
    "basePath": "./src/app/"
  },
  "dependencies": {
    "@alantech/angular": "^2.0.0-beta.3",
    "@alantech/ionic": "^2.0.0-beta.4",
    "@angular/animations": "~6.1.9",
    "@angular/common": "~6.1.9",
    "@angular/core": "~6.1.9",
    "@angular/forms": "~6.1.9",
    "@angular/http": "~6.1.9",
    "@angular/platform-browser": "~6.1.9",
    "@angular/platform-browser-dynamic": "~6.1.9",
    "@angular/router": "~6.1.9",
    "@datorama/akita": "^1.9.6",
    "@ionic-native/core": "5.0.0-beta.15",
    "@ionic-native/splash-screen": "5.0.0-beta.15",
    "@ionic-native/status-bar": "5.0.0-beta.15",
    "@ionic/angular": "4.0.0-beta.12",
    "@ionic/pro": "2.0.3",
    "@ionic/storage": "^2.2.0",
    "@mdi/font": "^2.8.94",
    "cordova-android": "^7.1.1",
    "cordova-plugin-device": "^2.0.2",
    "cordova-plugin-ionic": "^5.2.4",
    "cordova-plugin-ionic-keyboard": "^2.1.3",
    "cordova-plugin-ionic-webview": "^2.1.4",
    "cordova-plugin-splashscreen": "^5.0.2",
    "cordova-plugin-statusbar": "^2.4.2",
    "cordova-plugin-whitelist": "^1.3.3",
    "cordova-sqlite-storage": "^2.4.0",
    "core-js": "^2.5.3",
    "gsap": "^2.0.2",
    "moment": "^2.22.2",
    "ngx-auth": "^4.1.0",
    "ngx-take-until-destroy": "^5.1.0",
    "placeholder-loading": "^0.1.5",
    "rxjs": "6.2.2",
    "zone.js": "^0.8.26"
  },
  "devDependencies": {
    "@angular-devkit/architect": "0.9.0-beta.3",
    "@angular-devkit/build-angular": "0.9.0-beta.3",
    "@angular-devkit/core": "0.9.0-beta.3",
    "@angular-devkit/schematics": "0.9.0-beta.3",
    "@angular/cli": "^6.2.4",
    "@angular/compiler": "~6.1.9",
    "@angular/compiler-cli": "~6.1.9",
    "@angular/language-service": "~6.1.9",
    "@ionic/ng-toolkit": "^1.1.0",
    "@ionic/schematics-angular": "^1.0.7",
    "@types/gsap": "^1.19.2",
    "@types/jasmine": "~2.8.9",
    "@types/jasminewd2": "~2.0.5",
    "@types/node": "~10.9.2",
    "codelyzer": "~4.4.2",
    "jasmine-core": "~2.99.1",
    "jasmine-spec-reporter": "~4.2.1",
    "karma": "~3.0.0",
    "karma-chrome-launcher": "~2.2.0",
    "karma-coverage-istanbul-reporter": "~2.0.0",
    "karma-jasmine": "~1.1.1",
    "karma-jasmine-html-reporter": "^0.2.2",
    "protractor": "~5.4.0",
    "ts-node": "~7.0.0",
    "tslint": "~5.11.0",
    "typescript": "~2.9.2",
    "webpack-sources": "^1.3.0"
  },
  "description": "An Ionic project",
  "cordova": {
    "plugins": {
      "cordova-sqlite-storage": {},
      "cordova-plugin-whitelist": {},
      "cordova-plugin-statusbar": {},
      "cordova-plugin-device": {},
      "cordova-plugin-splashscreen": {},
      "cordova-plugin-ionic-webview": {
        "ANDROID_SUPPORT_ANNOTATIONS_VERSION": "27.+"
      },
      "cordova-plugin-ionic-keyboard": {}
    },
    "platforms": [
      "android"
    ]
  }
}
giacomocerquone commented 6 years ago

I noticed the exact same thing on windows 10

paulstelzer commented 6 years ago

Did you tried it with ng serve?

giacomocerquone commented 6 years ago

@paulstelzer yes, it's slow as hell too

dylanvdmerwe commented 6 years ago

Apparently upgrade to node 10 and try again.

giacomocerquone commented 6 years ago

Yes I confirm that updating to node v10 solves the problem. if @alan-albuquerque gives confirmation of this too, where can we write this info in the doc?

alan-albuquerque commented 6 years ago

Yes! Upgrade to Node v10 worked, thank you.

alan-albuquerque commented 6 years ago

Is this a bug or a documentation problem? I see another bug report for this problem today (#15868) and I guess that more will be open in the future.

ionitron-bot[bot] commented 5 years ago

Thanks for the issue! We use this issue tracker exclusively for bug reports and feature requests associated with the Ionic Framework. It appears that this issue is associated with the Ionic CLI. I am moving this issue to the Ionic CLI repository. Please track this issue over there.

Thank you for using Ionic!

ionitron-bot[bot] commented 5 years ago

Issue moved to: https://github.com/ionic-team/ionic-cli/issues/3784