BuilderIO/builder

Dependency conflict issue when running npm install in Builder Angular example project

dhruvesh9 opened this issue · 1 comments

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: zone.js@0.14.10 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/angular@3.1.1-0 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 zone.js@0.14.7, but the project installs zone.js@0.14.10, which causes a conflict.

Questions:

  1. Is @builder.io/angular version 3.1.1-0 incompatible with zone.js@0.14.10?
  2. Should I try to install the dependencies using --force or --legacy-peer-deps, or is there a recommended fix for this issue?

To Reproduce:

  1. Clone the Builder Angular example project
  2. 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:
... common, compiler, compiler-cli, core, elements, forms
... language-service, platform-browser, platform-browser-dynamic
... platform-server, router

Package Version

@angular-devkit/architect 0.1802.5 (cli-only)
@angular-devkit/build-angular
@angular-devkit/core 18.2.5 (cli-only)
@angular-devkit/schematics 18.2.5 (cli-only)
@angular/cli 18.2.5 (cli-only)
@schematics/angular 18.2.5 (cli-only)
rxjs 7.8.1 (cli-only)
typescript
zone.js
`

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.

#3615