Skip to content

Commit 42e16dd

Browse files
committed
refactor(@angular/ssr): mark @angular/platform-server as optional
Whlist, this package is not really optional, NPM will install the wrong verson of peer dependencies when the Angular CLI is in prerelease mode. ```ts STDERR: npm error code ERESOLVE npm error ERESOLVE unable to resolve dependency tree npm error npm error While resolving: [email protected] npm error Found: @angular/[email protected] npm error node_modules/@angular/animations npm error @angular/animations@"^19.1.0-next.0" from the root project npm error npm error Could not resolve dependency: npm error peer @angular/animations@"19.0.1" from @angular/[email protected] npm error node_modules/@angular/platform-server npm error peer @angular/platform-server@"^19.1.0-next.0 || ^19.0.0" from @angular/[email protected] npm error node_modules/@angular/ssr npm error @angular/ssr@"19.1.0-next.0" from the root project npm error npm error Fix the upstream dependency conflict, or retry npm error this command with --force or --legacy-peer-deps ```
1 parent af87780 commit 42e16dd

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

packages/angular/ssr/package.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@
2121
"@angular/platform-server": "^19.0.0",
2222
"@angular/router": "^19.0.0"
2323
},
24+
"peerDependenciesMeta": {
25+
"@angular/platform-server": {
26+
"optional": true
27+
}
28+
},
2429
"devDependencies": {
2530
"@angular/common": "19.0.1",
2631
"@angular/compiler": "19.0.1",

0 commit comments

Comments
 (0)