Skip to content

Conversation

@alan-agius4
Copy link
Collaborator

This commit replaces lazy imports with static imports in the node tasks of @angular-devkit/schematics. This change fixes an issue where migrations could fail during an update process if the package layout changes on disk (e.g. due to npm hoisting changes) after the main module is loaded but before the lazy chunks are requested. By using static imports, we ensure all necessary code is loaded upfront.

Closes #31974

This commit replaces lazy imports with static imports in the node tasks of `@angular-devkit/schematics`.
This change fixes an issue where migrations could fail during an update process if the package layout changes on disk (e.g. due to `npm` hoisting changes) after the main module is loaded but before the lazy chunks are requested. By using static imports, we ensure all necessary code is loaded upfront.

Closes angular#31974
@alan-agius4 alan-agius4 requested a review from clydin December 1, 2025 14:37
@alan-agius4 alan-agius4 added action: review The PR is still awaiting reviews from at least one requested reviewer target: patch This PR is targeted for the next patch release labels Dec 1, 2025
@alan-agius4 alan-agius4 added action: merge The PR is ready for merge by the caretaker and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Dec 1, 2025
@alan-agius4 alan-agius4 merged commit 98e10fa into angular:main Dec 1, 2025
37 of 38 checks passed
@alan-agius4 alan-agius4 deleted the scehmatics-fix branch December 1, 2025 16:10
@alan-agius4
Copy link
Collaborator Author

This PR was merged into the repository. The changes were merged into the following branches:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

action: merge The PR is ready for merge by the caretaker area: @angular-devkit/schematics target: patch This PR is targeted for the next patch release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ng update may crash if npm relocates core angular packages while migrations are running

2 participants