Dependency conflict issue when running npm install in Builder Angular example project
Hi,
I cloned the Builder Angular example project (https://github.com/BuilderIO/builder/tree/main/examples/angular) to test it locally.
After running npm install, I encountered the following error:
npm error code ERESOLVE npm error ERESOLVE unable to resolve dependency tree npm error npm error While resolving: builder-angular-example@undefined npm error Found: [email protected] npm error node_modules/zone.js npm error zone.js@"^0.14.8" from the root project npm error npm error Could not resolve dependency: npm error peer zone.js@"0.14.7" from @builder.io/[email protected] npm error node_modules/@builder.io/angular npm error @builder.io/angular@"^3.1.1-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 npm error to accept an incorrect (and potentially broken) dependency resolution.
It seems like @builder.io/angular v3.1.1-0 requires [email protected], but the project installs [email protected], which causes a conflict.
Questions:
- Is @builder.io/angular version 3.1.1-0 incompatible with [email protected]?
- Should I try to install the dependencies using --force or --legacy-peer-deps, or is there a recommended fix for this issue?
To Reproduce:
- Clone the Builder Angular example project
- Run npm install
Expected behavior: Node modules should install successfully without dependency issues.
Additional context: My current environment details:
Node.js version: v22.9.0 npm version: 10.8.3 Angular CLI version: 18.2.5 OS: Windows 10 x64
`Angular CLI: 18.2.5 Node: 22.9.0 Package Manager: npm 10.8.3 OS: win32 x64
Angular:
Package Version
@angular-devkit/architect 0.1802.5 (cli-only)
@angular-devkit/build-angular
Thanks in advance for your help!
I'm not sure what else I need to do besides manually test this solution, but I have created a pull request that makes the zone.js peer dependency more lenient.
https://github.com/BuilderIO/builder/pull/3615
Closed by #3615
Released in 5.0.1 https://github.com/BuilderIO/builder/blob/main/packages/angular/CHANGELOG.md#501