plotly / plotly/angular-plotly.js

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

未關閉
#255 1 則留言 2 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

主要語言
TypeScript
星號
242
分支
81
平均合併
8 小時 48 分鐘
30 天內合併 PR
18

描述

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?

貢獻指南

這個儲存庫沒有索引到貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

研究方向

首先,使用 issue 中列出的 Angular 17 與 angular-plotly.js 4.0.4 版本重現 NG6002 錯誤。檢查 app.module.ts 和 node_modules/angular-plotly.js/lib/plotly.module.d.ts,然後驗證可以在沒有 Ivy 相容性錯誤的情況下匯入 PlotlyModule。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
angular, typescript
領域
frontend
Issue 類型
缺陷
難度
4/5
預估耗時
3-5 天
活躍度
冷清
描述清晰度
需要釐清
新手友好度
35/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。