Skip to content

PlotlyViaCDNModule gives Error: Peer dependency plotly.js isn't installed #61

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

Closed
frankadrian opened this issue May 2, 2019 · 3 comments · Fixed by #62
Closed

PlotlyViaCDNModule gives Error: Peer dependency plotly.js isn't installed #61

frankadrian opened this issue May 2, 2019 · 3 comments · Fixed by #62
Assignees
Labels
bug Something isn't working

Comments

@frankadrian
Copy link

Hi good Sir,

I want to change form PlotlyModule to PlotlyViaCDNModule.

If I change to PlotlyViaCDNModule in my modules imports I get this error in the browser console:

angular-plotly.js.js:416 Error while plotting: Error: Peer dependency plotly.js isn't installed

Prior to this change my charts where rendering fine!

Versions:

@angular/cli@7.3.8
angular-plotly.js@1.3.1
plotly.js@1.47.4

Module:

... imports

PlotlyViaCDNModule.plotlyVersion = '1.5.0'; // can be `latest` or any version number (i.e.: '1.4.3')
PlotlyViaCDNModule.plotlyBundle = 'basic'; // optional: can be null (for full) or 'basic', 'cartesian', 'geo', 'gl3d', 'gl2d', 'mapbox' or 'finance'


const routes: Routes = [
  {
    path: '',
    component: AnalyseComponent,
  }
];

@NgModule({
  declarations: [AnalyseComponent, CrcBarChartComponent],
  imports: [
    CommonModule,
    PlotlyViaCDNModule,
    MatCardModule, MatButtonModule,
    RouterModule.forChild(routes)
  ],
  exports: [
    RouterModule
  ]
})
export class AnalyseModule { }

Kind Regards,
Frank

@andrefarzat
Copy link
Collaborator

@frankadrian you're right. It's a bug. The fix is coming in: #62

@andrefarzat
Copy link
Collaborator

@frankadrian Please, update to version 1.3.2. Reopen this if the issue continues. Thanks a lot for reporting the bug 😸

@frankadrian
Copy link
Author

Thanks @andrefarzat for the quick fix, its working 😎

@andrefarzat andrefarzat added the bug Something isn't working label May 3, 2019
@andrefarzat andrefarzat self-assigned this May 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants