Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

angular 6 compat? #15

Open
tosehee75 opened this issue May 14, 2018 · 16 comments
Open

angular 6 compat? #15

tosehee75 opened this issue May 14, 2018 · 16 comments

Comments

@tosehee75
Copy link

Any plan for this????????????????????

@SpiderPork
Copy link

Please fix Angular 6 compatibility!

@jhlee1025
Copy link

Please support Angular 6 ASAP !!!

@rousan
Copy link
Contributor

rousan commented Jun 13, 2018

Hello @tosehee75, @SpiderPork, @jhlee1025,

The existing angular4-fusioncharts wrapper is compatible with Angular 6.
Let us know if you face any problems.

@torresdaniel11
Copy link

Hello @rousan i still having this message when i try to upgrade mi angular version to the latest

Package "angular4-fusioncharts" has an incompatible peer dependency to "@angular/core" (requires ">=5.0.0-rc.0 <6.0.0||>=4.2.4 <5.0.0", would install "6.0.7").

i already delete and reinstall "fusioncharts": "^3.12.2", and "angular4-fusioncharts": "^1.0.0"

any idea on how to upgrade?

@SpiderPork
Copy link

I have the same problem, with the same error message.

@rousan
Copy link
Contributor

rousan commented Jul 6, 2018

Hey @torresdaniel11,
can you show us the exact messages printed in the console?

@balaji142857
Copy link

balaji142857 commented Jul 21, 2018

hello @rousan ,
Below is the warning I get when using angular4-fusioncharts with angular6 (it gets installed and entry is added in package.json file), but unable to use due to errors at runtime

npm install angular4-fusioncharts --save
npm WARN [email protected] requires a peer of @angular/compiler@^2.3.1 || >=4.0.0-beta <5.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of @angular/core@^2.3.1 || >=4.0.0-beta <5.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of @angular/core@^4.2.4 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

+ [email protected]
added 1 package from 3 contributors and audited 21778 packages in 11.036s

Getting the below error in browser at runtime:

ERROR TypeError: core is not a function
    at Function.push../node_modules/angular4-fusioncharts/dist/src/fusioncharts/fusioncharts.service.js.FusionChartsService.resolveFusionChartsCore (fusioncharts.service.js:23)
    at new FusionChartsService (fusioncharts.service.js:7)
    at _createClass (core.js:8206)
    at _createProviderInstance (core.js:8178)
    at resolveNgModuleDep (core.js:8141)
    at NgModuleRef_.push../node_modules/@angular/core/fesm5/core.js.NgModuleRef_.get (core.js:8849)
    at resolveDep (core.js:9214)
    at createClass (core.js:9088)
    at createDirectiveInstance (core.js:8971)
    at createViewNodes (core.js:10191)

update

tried using fcRoot instead of forRoot, but still getting the same error

@rousan
Copy link
Contributor

rousan commented Jul 23, 2018

@balaji142857, Please avoid the warning appeared during installing the package,
And you are facing the error at runtime as you are supposed to use the angular4-fusioncharts module as below in your AppModule:

import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
// Import fusioncharts modules
import * as FusionCharts from 'fusioncharts';
import * as Charts from 'fusioncharts/fusioncharts.charts';
import * as FintTheme from 'fusioncharts/themes/fusioncharts.theme.fint';
import { FusionChartsModule } from 'angular4-fusioncharts';
import { AppComponent } from './app.component';

// Call fcRoot with FusionCharts as first argument
FusionChartsModule.fcRoot(FusionCharts, Charts, FintTheme);

@NgModule({
    declarations: [
        AppComponent
    ],
    imports: [
        BrowserModule,
        FusionChartsModule
    ],
    providers: [],
    bootstrap: [AppComponent]
})
export class AppModule { }

@balaji142857
Copy link

@rousan thanks, it worked

@nitthi
Copy link

nitthi commented Aug 28, 2018

import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import * as FusionCharts from 'fusioncharts';
import * as Charts from 'fusioncharts/fusioncharts.charts';
import * as FusionTheme from 'fusioncharts/themes/fusioncharts.theme.fusion';
import { FusionChartsModule } from 'angular-fusioncharts';
FusionChartsModule.fcRoot(FusionCharts, Charts, FusionTheme);

import { AppComponent } from './app.component';

@NgModule({
declarations: [
AppComponent
],
imports: [
BrowserModule,
FusionChartsModule
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule { }

I got the below error,
fusion

@Nisha-Yadav-1
Copy link

I got this error.
Please help me out!
thanks in advance!
1

@rousan
Copy link
Contributor

rousan commented Aug 31, 2018

@nitthi,
The error you are facing is not related to fusioncharts, I think that is happening because of config mismatch in your build system.

@rousan
Copy link
Contributor

rousan commented Aug 31, 2018

@Nisha-Yadav-1
Can you tell me which version of fusioncharts you are using ?

@SurajGajbar
Copy link

@nitthi
I am also getting same error as @Nisha-Yadav-1.
Can you please help.
I have attached package.json file.
package.txt

@torresdaniel11
Copy link

torresdaniel11 commented Sep 17, 2018

i have the same error as @Nisha-Yadav-1

i start a new project created with AngularCLI
Angular CLI: 6.0.8
Angular: 6.1.7

"angular4-fusioncharts": "^1.0.0",
"fusioncharts": "^3.12.2"

@rousan i follow your example (is working on my angular 4 project) but in this project (V6) i have this error :
image

Please, give me a hand on this

Thanks

//-----------------------------------------------------------------------------------------------

i fix it

i found that in my packag-lock.json i had fusioncharts version 3.13.1

i replace

{
"fusioncharts": ...
}

with

  "fusioncharts": {
      "version": "3.12.2",
      "resolved": "https://registry.npmjs.org/fusioncharts/-/fusioncharts-3.12.2.tgz",
      "integrity": "sha512-uCOkD1KN7NbZRS0xsA3BYhxYeOeKab2oWlAN9i60g2Hu+Hap7kphGlS9o6y6YJLHu7494/f4+/Hu5D0VSVmytg=="
    }

then i delete my node_module folder and run

npm install

ng serve

and everything start working again!

@ashok1994
Copy link
Contributor

@torresdaniel11 please refer the new plugin for fusioncharts, angular-fusioncharts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants