Skip to content

fix(angular): allow newer @angular-devkit peers - #732

Open
leoortizz wants to merge 2 commits into
mainfrom
fix/angular-peer-ranges
Open

leoortizz wants to merge 2 commits into
mainfrom
fix/angular-peer-ranges

Conversation

@leoortizz

@leoortizz leoortizz commented Nov 25, 2026 •

Copy link
Copy Markdown
Member

@apphosting/adapter-angular pinned its optional @angular-devkit peers to Angular 17.2. When an app lists the adapter in its own package.json (for example to pin it), npm install fails with ERESOLVE in Nx workspaces on newer Angular, because Nx lists @angular-devkit/core as a root dependency and npm can't satisfy both versions. Plain Angular apps only get devkit through @angular/build, so npm installs nested copies instead. Stock App Hosting deploys aren't affected because the buildpack installs the adapter on its own.

What changed

Both peers now accept 17.2 and later (>=17.2.0 and >=0.1702.0), like the next peer in @google-cloud/adapter-nextjs. * (as in @apphosting/adapter-nextjs, #336) or a list of supported majors would also work. A minimum still lets npm flag Angular versions the adapter doesn't support, and unlike a list it doesn't need an adapter release for every new major.

Tested in an Angular 22.2 Nx workspace with the adapter as a devDependency: the published 17.2.17 fails with ERESOLVE, this change installs.

The optional @Angular-devkit peers were pinned to Angular 17.2. On
newer Angular, installing the adapter failed in Nx workspaces. In
plain apps it moved the app's devkit packages out of the root of
node_modules, so the adapter build could no longer load them.

Both peers now accept any version, as the Next.js adapter already
does for `next`.
Replace `*` with a minimum tied to the adapter's version, so npm
still flags Angular versions older than the adapter supports.
@leoortizz leoortizz changed the title Fix/angular peer ranges fix(angular): allow newer @angular-devkit peers Nov 25, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the peer dependencies for @angular-devkit/architect and @angular-devkit/core in package.json to use >= version ranges instead of ~ ranges. The corresponding unit tests in create.spec.ts have been updated to reflect and validate these new version requirements. I have no feedback to provide.

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant