plotly / plotly/angular-plotly.js
'PlotlyModule' does not appear to be an NgModule class.
Nessuno ha ancora preso questa issue.
- Lingua principale
- TypeScript
- Stelle
- 242
- Fork
- 81
- Merge medio
- 8h 48m
- PR unite (30g)
- 18
Descrizione
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?
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia riproducendo l'errore NG6002 con le versioni Angular 17 e angular-plotly.js 4.0.4 indicate nell'issue. Ispeziona app.module.ts e node_modules/angular-plotly.js/lib/plotly.module.d.ts, quindi verifica che PlotlyModule possa essere importato senza l'errore di compatibilità Ivy.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- angular, typescript
- Ambito
- frontend
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Tranquilla
- Chiarezza
- Da chiarire
- Idoneità per principianti
- 35/100