TypeError: PlotlyService.plotly.purge is not a function
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Cần làm rõ
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- angular, typescript
- Lĩnh vực
- frontend
Hướng nghiên cứu
Bắt đầu bằng cách tái hiện kịch bản chuyển đổi module động, sau đó truy vết PlotlyComponent.ngOnDestroy và PlotlyService.plotly.purge trong angular-plotly.js. So sánh cách PlotlyViaCDNModule được cấu hình và tải trong hai module; hoàn tất khi việc chuyển đổi ngữ cảnh không còn gây ra purge TypeError.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- TypeScript
- Star
- 242
- Fork
- 81
- Merge trung bình
- 23 giờ 52 phút
- Pull request đã merge (30 ngày)
- 5
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của plotly/angular-plotly.js
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
plotly/angular-plotly.js#373 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Feature request: please add migration guideCó thể đã có người làm @andrefarzat đã nhận 21 ngày trước. Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 45/100
plotly/angular-plotly.js#285 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
event handlers are not typedCó thể đã có người làm @andrefarzat đã nhận 21 ngày trước. Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 38/100
plotly/angular-plotly.js#283 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Angular 20 standalone applicationCó thể đã có người làm @andrefarzat đã nhận 21 ngày trước. Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
plotly/angular-plotly.js#281 · 8 bình luận · 2 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Angular 19 specs won't runĐang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 25/100
plotly/angular-plotly.js#278 · 2 bình luận · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của plotly/angular-plotly.js
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
caprover/caprover-frontend#273 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
ai-driven-dev/framework#1147 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
agent-ui bug p2
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
cybersemics/em#6232 ·
Maintainer thường phản hồi trong vòng 1 ngày