Git Product home page Git Product logo

Comments (20)

inf0dr0id avatar inf0dr0id commented on September 23, 2024 1

@Pauan works without errors for me in an Angular 11 project. But I'm getting a warning concerning the @angular/core dependency which causes problems when updating Angular. Would be great if the dependency could be bumped to 11.

WARN @amcharts/[email protected] requires a peer of @angular/core@^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0 but none is installed. You must install peer dependencies yourself.

from amcharts3-angular2.

c-goldschmidt avatar c-goldschmidt commented on September 23, 2024 1

@jonbergan due to the size of this library, we decided to just not use it and just built our own AmChartsService with only the functionality we needed at that point (i.e. runinng chart creation and updates outside the zone). Since this library doens't provide any typing, we didn't loose a lot doing this.

from amcharts3-angular2.

Pauan avatar Pauan commented on September 23, 2024 1

@inf0dr0id I fixed the warning, it should now work perfectly with all versions of Angular (including 12).

from amcharts3-angular2.

Pauan avatar Pauan commented on September 23, 2024 1

I just published version 3.0.0 which should work with Angular 12 Ivy (including SSR).

from amcharts3-angular2.

mic8 avatar mic8 commented on September 23, 2024

Is there any update for this issue?

from amcharts3-angular2.

anne-gropler avatar anne-gropler commented on September 23, 2024

Will it be possible to use with Angular 9 anytime soon?

from amcharts3-angular2.

ignlg avatar ignlg commented on September 23, 2024

This is what worked for me to avoid this issue using Angular 10.0.14:

  • Removing ngcc calls from package.json scripts. Specifically postinstall that was doing ngcc --tsconfig './src/tsconfig.app.json'.
  • Removing/disabling strict options from tsconfig's angularCompilerOptions. Specifically removing strictInjectionParameters.

I hope it helps someone in the meantime 👍

from amcharts3-angular2.

guilhermejcgois avatar guilhermejcgois commented on September 23, 2024

Any updates from @amcharts team?

from amcharts3-angular2.

smileLilith avatar smileLilith commented on September 23, 2024

@amcharts any plans to support version 9 or later?

from amcharts3-angular2.

Pauan avatar Pauan commented on September 23, 2024

I'm sorry, this slipped through the cracks, but I'll fix this ASAP.

from amcharts3-angular2.

Pauan avatar Pauan commented on September 23, 2024

I tested this with Angular 11 (with strict mode) and everything works perfectly. And according to the Angular docs we should be doing things correctly:

https://angular.io/guide/ivy#maintaining-library-compatibility

So can somebody confirm that they are getting errors?

from amcharts3-angular2.

anne-gropler avatar anne-gropler commented on September 23, 2024

I can confirm that I get errors I import AmChartsModule like this:

Error: node_modules/@amcharts/amcharts3-angular/es2015/index.d.ts:75:22 - error NG6002: Appears in the NgModule.imports of ChartsModule, but could not be resolved to an NgModule class.

This likely means that the library (@amcharts/amcharts3-angular/es2015) which declares AmChartsModule has not been processed correctly by ngcc, or is not compatible with Angular Ivy. Check if a newer version of the library is available, and update if so. Also consider checking with the library's authors to see if the library is expected to be compatible with Ivy.

75 export declare class AmChartsModule {
                        ~~~~~~~~~~~~~~
MY_PATH/amcharts.module.ts:29:14 - error NG6002: Appears in the NgModule.imports of MY_MODULE, but itself has errors

I also tried importing it from '@amcharts/amcharts3-angular/es2015'; instead of '@amcharts/amcharts3-angular';.

I always get the same errors. Removing the postinstall: "ngcc" did not fix it.

My group found an internal solution (i.e. writing things on our own), so from our side, this issue needs no further fix. I just wanted to confirm that the errors still happen.

from amcharts3-angular2.

jem890 avatar jem890 commented on September 23, 2024

Hello, how could I solve this issue? Thanks

ERROR in node_modules/@amcharts/amcharts3-angular/es2015/index.d.ts:75:22 - error NG6002: Appears in the NgModule.imports of AppModule, but could not be resolved to an NgModule class.

from amcharts3-angular2.

jcn-ithaca avatar jcn-ithaca commented on September 23, 2024

I'm evaluating amCharts for possible integration in our Angular 12 project. This issue makes me wonder if there are compatibility issues. Any advice?

from amcharts3-angular2.

jonbergan avatar jonbergan commented on September 23, 2024

I can confirm that I get errors I import AmChartsModule like this:

Error: node_modules/@amcharts/amcharts3-angular/es2015/index.d.ts:75:22 - error NG6002: Appears in the NgModule.imports of ChartsModule, but could not be resolved to an NgModule class.

This likely means that the library (@amcharts/amcharts3-angular/es2015) which declares AmChartsModule has not been processed correctly by ngcc, or is not compatible with Angular Ivy. Check if a newer version of the library is available, and update if so. Also consider checking with the library's authors to see if the library is expected to be compatible with Ivy.

75 export declare class AmChartsModule {
                        ~~~~~~~~~~~~~~
MY_PATH/amcharts.module.ts:29:14 - error NG6002: Appears in the NgModule.imports of MY_MODULE, but itself has errors

I also tried importing it from '@amcharts/amcharts3-angular/es2015'; instead of '@amcharts/amcharts3-angular';.

I always get the same errors. Removing the postinstall: "ngcc" did not fix it.

My group found an internal solution (i.e. writing things on our own), so from our side, this issue needs no further fix. I just wanted to confirm that the errors still happen.

Hi Anne, are you able to share what your team did to resolve this issues from your end?

from amcharts3-angular2.

MateEke avatar MateEke commented on September 23, 2024

I'm evaluating amCharts for possible integration in our Angular 12 project. This issue makes me wonder if there are compatibility issues. Any advice?

Use the current version - amCharts 4 - easier to integrate and there aren't any compatibility issues.

from amcharts3-angular2.

anne-gropler avatar anne-gropler commented on September 23, 2024

Hi Anne, are you able to share what your team did to resolve this issues from your end?

@jonbergan Unfortunately, I cannot share, I switched teams in the meantime. But maybe @c-goldschmidt can?

from amcharts3-angular2.

Pauan avatar Pauan commented on September 23, 2024

I just now tested Angular 11 and Angular 12, I followed the instructions step by step, and everything worked perfectly.

@anne-gropler @jem890 @c-goldschmidt Could you please share what version of Angular you are using, and if you are using any custom build scripts?

from amcharts3-angular2.

jem890 avatar jem890 commented on September 23, 2024

Many thanks for the update. It works well but when I run the project in ssr mode (angular universal), I get this error:

Error: Cannot find module '@angular/core'

I also found:

WARNING in ./node_modules/@amcharts/amcharts3-angular/umd/index.js 3:20-27
Critical dependency: require function is used in a way in which dependencies cannot be statically extracted

Could you help us to fix? Many thanks

from amcharts3-angular2.

Pauan avatar Pauan commented on September 23, 2024

@jem890 Oh, I see, it builds fine in normal mode but breaks in SSR mode. It also seems to work fine in Angular 11, it's only broken in Angular 12...

It seems Angular is removing support for Angular 5-8, so I guess I will need to publish a new major version.

from amcharts3-angular2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.