Skip to content

[Bug]: npm dependencies update in an o3r generated project are not handled correctly #2681

Open
@malek-benazzouz

Description

Package name

core

Package version

11.5.6

Reproduction steps

Generate a project with an app:

npm create @o3r project # Uses o3r deps v 11.5.6
cd project
ng g application app

Then, update all the @o3r/x dependencies in both the root package.json and the app package.json files, to a newer version, for example version 11.6.0-rc.2.

Then run npm install to install all these new versions.

Current result

The npm install command fails:

$ npm i
npm error code ERESOLVE
npm error ERESOLVE could not resolve
npm error
npm error While resolving: project@0.0.0-placeholder
npm error Found: @ama-sdk/core@11.5.6
npm error node_modules/@ama-sdk/core
npm error   @ama-sdk/core@"~11.6.0-rc.2" from the root project
npm error   peerOptional @ama-sdk/core@"^11.5.6" from @ama-sdk/schematics@11.5.6
npm error   node_modules/@ama-sdk/schematics
npm error     @ama-sdk/schematics@"~11.6.0-rc.2" from the root project
npm error   1 more (@o3r/store-sync)
npm error
npm error Could not resolve dependency:
npm error @ama-sdk/core@"~11.6.0-rc.2" from the root project
npm error
npm error Conflicting peer dependency: @o3r/schematics@11.6.0-rc.5
npm error node_modules/@o3r/schematics
npm error   peerOptional @o3r/schematics@"^11.6.0-rc.5" from @ama-sdk/core@11.6.0-rc.5
npm error   node_modules/@ama-sdk/core
npm error     @ama-sdk/core@"~11.6.0-rc.2" 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.
npm error
npm error
npm error For a full report see:
npm error C:\Users\mbenazzouz\AppData\Local\npm-cache\_logs\2025-01-09T12_51_00_904Z-eresolve-report.txt
npm error A complete log of this run can be found in: C:\Users\mbenazzouz\AppData\Local\npm-cache\_logs\2025-01-09T12_51_00_904Z-debug-0.log

Note: if I retry using --force option, it manages to install all the deps correctly.

Expected result

I would expect my npm install to correctly install the new versions, without having to pass --force option.

Additional comments

No response

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions