angular-plotly.js icon indicating copy to clipboard operation
angular-plotly.js copied to clipboard

Angular 11 - plotly-plot' is not a known element

Open kperveen opened this issue 3 years ago • 3 comments

I followed the getting started steps provided in the documentation but I am not able to run Plotly successfully

npm version: 6.14.6 node version: 12.18.1 Angular cli version: 11.2.14

I get the following error when I add <plotly-plot> element to my template

plotly-plot' is not a known element:

I have tried the following

  1. Used the CDN version
  2. https://github.com/plotly/angular-plotly.js/issues/155

Did I miss something?

kperveen avatar Jan 25 '22 12:01 kperveen

Hello @kperveen , funny is that this is an angular error. Could you confirm that you've added/imported the PlotlyViaCdnModule correctly to the app.module ?

andrefarzat avatar Jan 25 '22 19:01 andrefarzat

Same problem with angular 13.3.2. Importing PlotlyModule in AppModule but when compiling it fails on the . Any update on this issue?

fmonegaglia avatar Apr 08 '22 12:04 fmonegaglia

I get this error:

Error: src/app/features/esums/esums.module.ts:37:5 - error NG6002: 'PlotlyModule' does not appear to be an NgModule class.

37     PlotlyModule,
       ~~~~~~~~~~~~

  .yarn/__virtual__/angular-plotly.js-virtual-15eb60545d/0/cache/angular-plotly.js-npm-4.0.4-a6b83620e2-759af9442d.zip/node_modules/angular-plotly.js/lib/plotly.module.d.ts:1:22
    1 export declare class PlotlyModule {
                           ~~~~~~~~~~~~
    This likely means that the library (angular-plotly.js) which declares PlotlyModule 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.

I setup the project with yarn using pnp. Now it throws this error.

Zaffer avatar Dec 16 '22 14:12 Zaffer