Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Changes will no longer be recognized if you remove and re-add same component

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

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
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
angular, typescript
Lĩnh vực
build-system, tooling

Hướng nghiên cứu

Bắt đầu với các bản tái hiện StackBlitz được liên kết và chạy lệnh serve bằng chuỗi thao tác xóa rồi thêm lại được mô tả trong issue. So sánh hành vi trước và sau ng cache clean; được xem là hoàn tất khi các thay đổi tiếp theo đối với component được thêm lại được nhận diện mà không cần xóa cache Angular hoặc khởi động lại máy chủ dev.

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

Mô tả

angular/build:application area: @angular/build freq1: low severity5: regression type: bug/fix
Command

serve

Is this a regression?
  • Yes, this behavior used to work in the previous version
The previous version in which this bug was not present was

No response

Description

Changes will no longer be recognized if you remove and re-add same component.

Minimal Reproduction

Removing and re-adding the import of the component (import { TestComponent } from ‘./test/test.component’), the component in the imports array and in the template (<app-test>) leads to that no further changes to this component are recognized.

Image

Repro App V18

Problem also in V19

Exception or Error

Your Environment
**v18 Reproduction environment:**
Angular CLI: 18.2.12
Node: 18.20.3
Package Manager: npm 10.2.3
OS: linux x64

Angular: 18.2.12
... animations, build, cli, common, compiler, compiler-cli, core
... forms, platform-browser, router

Package                      Version
------------------------------------------------------
@angular-devkit/architect    0.1802.12
@angular-devkit/core         18.2.12 (cli-only)
@angular-devkit/schematics   18.2.12
@schematics/angular          18.2.12
rxjs                         7.8.1
typescript                   5.5.4
zone.js                      0.14.10

**v19 Reproduction environment:**
Angular CLI: 19.0.0
Node: 18.20.3
Package Manager: npm 10.2.3
OS: linux x64

Angular: 19.0.0
... animations, build, cli, common, compiler, compiler-cli, core
... forms, platform-browser, router

Package                      Version
------------------------------------------------------
@angular-devkit/architect    0.1900.0
@angular-devkit/core         19.0.0
@angular-devkit/schematics   19.0.0
@schematics/angular          19.0.0
rxjs                         7.8.1
typescript                   5.6.3
zone.js                      0.15.0
Anything else relevant?

After clearing the Angular cache with ng cache clean and restarting the dev server with ng serve it works again.
So probably a caching bug.

Ngôn ngữ chính
TypeScript
Star
27k
Fork
11.8k
Merge trung bình
16 giờ 35 phút
Pull request đã merge (30 ngày)
176

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

Mở hướng dẫn đóng góp

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.

Issue khác của angular/angular-cli

Tất cả issue của angular/angular-cli

Issue tương tự

Thêm issue về TypeScript

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.