plotly / plotly/angular-plotly.js
'PlotlyModule' does not appear to be an NgModule class.
Open
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 242
- Forks
- 81
- Avg merge
- 8h 48m
- Merged PRs (30d)
- 18
Description
We are experiencing an issue when using angular-plotly.js and Angular17 saying that "'PlotlyModule' does not appear to be an NgModule class."
Error
error NG6002: 'PlotlyModule' does not appear to be an NgModule class.
176 PlotlyModule,
~~~~~~~~~~~~
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 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.
app.module.ts
import * as PlotlyJS from 'plotly.js-dist-min';
import { PlotlyModule } from 'angular-plotly.js';
PlotlyModule.plotlyjs = PlotlyJS;
@NgModule({
declarations: [
...,
],
imports: [
...,
PlotlyModule,
...,
]
});
Package Details
"@angular/animations": "^17.0.9",
"@angular/cdk": "^16.2.13",
"@angular/common": "^17.0.9",
"@angular/compiler": "^17.0.9",
"@angular/core": "^17.0.9",
"@angular/forms": "^17.0.9",
"@angular/material": "^16.2.13",
"@angular/platform-browser": "^17.0.9",
@angular/platform-browser-dynamic": "^17.0.9",
"@angular/router": "^17.0.9",
"angular-plotly.js": "^4.0.4",
"moment": "^2.29.4",
"plotly.js-dist-min": "^2.21.0",
"rxjs": "~7.5.0",
"tslib": "^2.3.0",
"zone.js": "~0.14.3"
Is there something that can be done that will enable this to work?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the NG6002 error with the Angular 17 and angular-plotly.js 4.0.4 versions listed in the issue. Inspect app.module.ts and node_modules/angular-plotly.js/lib/plotly.module.d.ts, then verify that PlotlyModule can be imported without the Ivy compatibility error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- angular, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100