amcharts / amcharts4

The most advanced amCharts charting library for JavaScript and TypeScript apps.
https://www.amcharts.com/
1.16k stars 321 forks source link

4.9.5 breaks production runtime for Angular 9 Latest #2200

Closed jimmykane closed 4 years ago

jimmykane commented 4 years ago

Latest Angular deps Latest Amcharts

The app cannot bootstrap, reverting to prev works for amcharts.

Strange

TypeError
Cannot read property '_moduleDoBootstrap' of undefined
martynasma commented 4 years ago

What's your version of TS?

If I understand correctly Angular 9 requires TS 3.6+ which introduced a bunch of breaking chances (a super weird decision on TS team's part).

We're going to need to look into it, if we can somehow make it work.

jimmykane commented 4 years ago

I was using Angular 9 so long now with no issue. But somehow the project runtime broke with latest AmCharts. I will be providing more info as I can dig more into it.

Production build compliles fine but breaks on runtime which is very strange imo

martynasma commented 4 years ago

You must have used one of the earlier versions. We have upgraded briefly to TS 3.6 for a few versions, then reverted back because of the issues I mentioned.

jimmykane commented 4 years ago

What do you mean with one of the earlier versions ?

Pauan commented 4 years ago

@jimmykane What is the version of @amcharts/amcharts4 that you're using? Look it up in the yarn.lock or package-lock.json files.

jimmykane commented 4 years ago
{
  "name": "quantified-self",
  "version": "5.6.30-Bisbiki",
  "license": "SEE LICENSE IN LICENSE.md",
  "scripts": {
    "ng": "ng",
    "start": "ng serve",
    "clean": "rm -rf dist",
    "build": "ng build --verbose",
    "build-beta": "ng build --verbose --configuration beta",
    "build-production": "ng build --verbose --prod",
    "firebase-hosting-beta": "firebase deploy --only hosting:beta",
    "firebase-hosting-production": "firebase deploy --only hosting:production",
    "build-and-deploy-prod": "npm run clean && npm run build-production && npm run firebase-hosting-production",
    "build-and-deploy-beta": "npm run clean && npm run build-beta && npm run firebase-hosting-beta",
    "test": "ng test",
    "test-coverage": "ng test --code-coverage",
    "lint": "ng lint",
    "e2e": "ng e2e",
    "postinstall": "ngcc --properties es2015 browser module main --first-only --create-ivy-entry-points"
  },
  "private": true,
  "dependencies": {
    "@agm/core": "^1.1.0",
    "@amcharts/amcharts4": "4.9.4",
    "@angular/animations": "9.0.4",
    "@angular/cdk": "^9.1.0",
    "@angular/common": "9.0.4",
    "@angular/compiler": "9.0.4",
    "@angular/core": "9.0.4",
    "@angular/fire": "6.0.0-rc.1",
    "@angular/forms": "9.0.4",
    "@angular/material": "^9.1.0",
    "@angular/platform-browser": "9.0.4",
    "@angular/platform-browser-dynamic": "9.0.4",
    "@angular/platform-server": "9.0.4",
    "@angular/router": "9.0.4",
    "@angular/service-worker": "9.0.4",
    "@google/markerclustererplus": "^5.0.1",
    "@sentry/browser": "^5.13.0",
    "@sports-alliance/sports-lib": "^4.0.3",
    "@types/pako": "^1.0.1",
    "@types/uuid": "^7.0.0",
    "buffer": "^5.4.3",
    "fast-deep-equal": "^3.1.1",
    "firebase": "^7.9.3",
    "hammerjs": "^2.0.8",
    "material-design-icons-iconfont": "^5.0.1",
    "ng2-logger": "3.0.11",
    "rxjs": "^6.5.4",
    "wasm-flate": "1.0.2-bundler",
    "zone.js": "~0.10.2"
  },
  "devDependencies": {
    "@angular-devkit/build-angular": "~0.900.4",
    "@angular/cli": "^9.0.4",
    "@angular/compiler-cli": "9.0.4",
    "@types/googlemaps": "^3.39.3",
    "@types/jasmine": "3.5.7",
    "@types/node": "^13.7.7",
    "codelyzer": "^5.1.2",
    "first-input-delay": "^0.1.3",
    "jasmine-core": "^3.5.0",
    "jasmine-spec-reporter": "~4.2.1",
    "karma": "~4.4.1",
    "karma-chrome-launcher": "~3.1.0",
    "karma-cli": "~2.0.0",
    "karma-coverage-istanbul-reporter": "^2.1.1",
    "karma-jasmine": "~3.1.1",
    "karma-jasmine-html-reporter": "^1.5.2",
    "protractor": "~6.0.0",
    "ts-node": "~8.6.2",
    "tslint": "~6.0.0",
    "typescript": "3.7.5"
  }
}

With the above it works

When I just updated am4charts to 4.9.5 it broke.

I will provide more info in the coming hours.

Pauan commented 4 years ago

@jimmykane If you change your script to this, does it work?

"build-production": "ng build --verbose --prod --build-optimizer=false",
jimmykane commented 4 years ago

Going to try this now

jimmykane commented 4 years ago

Unfortunately I cannot reproduce this now.

I deleted the node_modules reinstalled all with the 4.9.5 version of AmCharts and production build looks ok.

Lets keep a bit this open, just in case, will be doing a release later this day with this version of charts.

After that is done I ll close this, sorry for your time, I am suspecting some node module issue.

jimmykane commented 4 years ago

Closing this as no reproducible anymore. Sorry for your time :-(

Pauan commented 4 years ago

@jimmykane No problem, I'm glad you were able to get it working.