plotly / plotly/angular-plotly.js

'PlotlyModule' does not appear to be an NgModule class.

Offen
#255 1 Kommentar 2 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Vorherrschende Sprache
TypeScript
Sterne
242
Forks
81
Ø Merge
8 Std. 48 Min.
Gemergte PRs (30 T.)
18

Beschreibung

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?

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Beginne damit, den NG6002-Fehler mit den in der Issue aufgeführten Versionen Angular 17 und angular-plotly.js 4.0.4 zu reproduzieren. Untersuche app.module.ts und node_modules/angular-plotly.js/lib/plotly.module.d.ts und überprüfe anschließend, dass PlotlyModule ohne den Ivy-Kompatibilitätsfehler importiert werden kann.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
angular, typescript
Bereich
frontend
Issue-Typ
Bug
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Ruhig
Klarheit
Muss geklärt werden
Anfängerfreundlichkeit
35/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.