fix(@schematics/angular): update @types/node to a version vitest 5 accepts - #34118
Merged
Merged
Conversation
…cepts `ng new --ssr` and `ng add @angular/ssr` fail to install their dependencies: the server schematic adds `@types/node@^20.17.19`, and vitest 5, which the same schematics now add, has `@types/node@^22.0.0 || >=24.0.0` as a peer. npm refuses the tree and the workspace is left without `node_modules`. `^22.12.0` is what this repository uses for `@types/node` itself, and Node 20 is already outside the `engines.node` range of the generated project.
alan-agius4
approved these changes
Sep 18, 2026
Collaborator
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Checklist
Please check to confirm your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
ng new --ssrandng add @angular/ssron 22.2.0-rc.0 fail while installing:The workspace files are written but there is no
node_modules. The server schematic adds@types/nodefromlatest-versions, which is still^20.17.19, while the same schematics now add vitest 5, whose peer range starts at 22. Plainng newis unaffected, since only the server schematic adds@types/node.Issue Number: N/A
What is the new behavior?
ng new --ssrinstalls.^22.12.0is the range this repository already uses for its own@types/node, and Node 20 is outside theengines.noderange of the generated project anyway.Does this PR introduce a breaking change?