plotly / plotly/angular-plotly.js

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

Đang mở
#255 1 bình luận 2 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Ngôn ngữ chính
TypeScript
Star
242
Fork
81
Merge trung bình
8 giờ 48 phút
Pull request đã merge (30 ngày)
18

Mô tả

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?

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Hướng nghiên cứu

Bắt đầu bằng cách tái hiện lỗi NG6002 với các phiên bản Angular 17 và angular-plotly.js 4.0.4 được liệt kê trong issue. Kiểm tra app.module.ts và node_modules/angular-plotly.js/lib/plotly.module.d.ts, sau đó xác minh rằng có thể import PlotlyModule mà không gặp lỗi tương thích Ivy.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
angular, typescript
Lĩnh vực
frontend
Loại issue
Lỗi
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Ít trao đổi
Độ rõ ràng
Cần làm rõ
Mức phù hợp với người mới
35/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.