TypeError: PlotlyService.plotly.purge is not a function
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 35/100
- issue の種類
- バグ
- 明瞭さ
- 説明が足りない
- 活発さ
- 停滞
- 技術スタック
- angular, typescript
- 領域
- frontend
調査の方向性
まず動的なモジュール切り替えのシナリオを再現し、次に angular-plotly.js で PlotlyComponent.ngOnDestroy と PlotlyService.plotly.purge を追跡します。2つのモジュールで PlotlyViaCDNModule がどのように設定および読み込まれるかを比較します。コンテキストの切り替えで purge TypeError が発生しなくなれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Getting this error when switching active submodules
core.js:6486 ERROR Error: Uncaught (in promise): TypeError: PlotlyService.plotly.purge is not a function
TypeError: PlotlyService.plotly.purge is not a function
at Function.remove (:4200/default-src_app_service_comp-reg_service_ts.js:25186)
at PlotlyComponent.ngOnDestroy (:4200/default-src_app_service_comp-reg_service_ts.js:25348)
at executeOnDestroys (:4200/vendor.js:32351)
at cleanUpView (:4200/vendor.js:32254)
at destroyViewTree (:4200/vendor.js:32080)
at destroyLView (:4200/vendor.js:32232)
at RootViewRef.destroy (:4200/vendor.js:47596)
at ComponentRef$1.destroy (:4200/vendor.js:50130)
at RouterOutlet.deactivate (:4200/vendor.js:93334)
at ActivateRoutes.deactivateRouteAndOutlet (:4200/vendor.js:89858)
at resolvePromise (:4200/polyfills.js:1222)
at resolvePromise (:4200/polyfills.js:1176)
at :4200/polyfills.js:1288
at ZoneDelegate.invokeTask (:4200/polyfills.js:415)
at Object.onInvokeTask (:4200/vendor.js:53612)
at ZoneDelegate.invokeTask (:4200/polyfills.js:414)
at Zone.runTask (:4200/polyfills.js:187)
at drainMicroTaskQueue (:4200/polyfills.js:591)
defaultErrorLogger @ core.js:6486
Submodule config:
...
import { PlotlyViaCDNModule } from 'angular-plotly.js';
PlotlyViaCDNModule.setPlotlyVersion('latest');
PlotlyViaCDNModule.setPlotlyBundle('finance');
@NgModule({
declarations: [
DcComponent,
DcChartComponent,
...
],
imports: [
CommonModule,
DcRoutingModule,
...
PlotlyViaCDNModule,
...
]
...
}
export class DcModule { }
Note that the scenario is that the Plotly Data Card is configured and saved in one module, then dynamically loaded and displayed in another module. The error occurs sometimes when switching contexts (modules). I guess when the second by loading order is first loaded.
Env:
$ npm list angular-plotly.js
...
└── [email protected]
$ ng version
_ _ ____ _ ___
/ \ _ __ __ _ _ _| | __ _ _ __ / ___| | |_ _|
/ △ \ | '_ \ / _` | | | | |/ _` | '__| | | | | | |
/ ___ \| | | | (_| | |_| | | (_| | | | |___| |___ | |
/_/ \_\_| |_|\__, |\__,_|_|\__,_|_| \____|_____|___|
|___/
Angular CLI: 12.2.12
Node: 14.17.0
Package Manager: npm 7.20.5
OS: linux x64
Angular: 12.2.12
... animations, cdk, cli, common, compiler, compiler-cli, core
... forms, language-service, material, platform-browser
... platform-browser-dynamic, router
Package Version
---------------------------------------------------------
@angular-devkit/architect 0.1202.12
@angular-devkit/build-angular 12.2.12
@angular-devkit/core 12.2.12
@angular-devkit/schematics 12.2.12
@angular/flex-layout 12.0.0-beta.35
@schematics/angular 12.2.12
rxjs 6.6.7
typescript 4.3.5
Thanks.
- 主要言語
- TypeScript
- スター
- 242
- フォーク
- 81
- 平均マージ
- 23時間 52分
- マージ済み PR(30日)
- 5
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
plotly/angular-plotly.js のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
plotly/angular-plotly.js#373 ·
メンテナーはふだん 1 日以内に返信
-
Feature request: please add migration guide対応中かも @andrefarzat が 21 日前に担当しました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 45/100
plotly/angular-plotly.js#285 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信
-
event handlers are not typed対応中かも @andrefarzat が 21 日前に担当しました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 38/100
plotly/angular-plotly.js#283 ·
メンテナーはふだん 1 日以内に返信
-
Angular 20 standalone application対応中かも @andrefarzat が 21 日前に担当しました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
plotly/angular-plotly.js#281 · コメント 8 件 · リアクション 2 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 3/5 1〜2日 初心者へのやさしさ 25/100
plotly/angular-plotly.js#278 · コメント 2 件 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
plotly/angular-plotly.js の issue をすべて見る
似ている issue
-
needs investigation
難易度 2/5 1〜3時間 初心者へのやさしさ 60/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
area:visualizer tech-debt
難易度 2/5 1時間未満 初心者へのやさしさ 66/100
jmbarzee/temporal-architect#292 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
riverqueue/river#1576 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
colbymchenry/codegraph#3228 ·
メンテナーはふだん 1 日以内に返信