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 11 - plotly-plot' is not a known element #186

Open
kperveen opened this issue Jan 25, 2022 · 3 comments
Open

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

kperveen opened this issue Jan 25, 2022 · 3 comments

Comments

@kperveen
Copy link

kperveen commented Jan 25, 2022

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. Could not find a declaration file for module 'plotly.js/dist/plotly.js' #155

Did I miss something?

@kperveen kperveen changed the title Angular 11 - Error adding Plotly Angular 11 - plotly-plot' is not a known element Jan 25, 2022
@andrefarzat
Copy link
Collaborator

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 ?

@fmonegaglia
Copy link

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

@Zaffer
Copy link

Zaffer commented Dec 16, 2022

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.

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

4 participants