You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
npm create @o3r project # Uses o3r deps v 11.5.6cd 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: [email protected]
npm error Found: @ama-sdk/[email protected]
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/[email protected]
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/[email protected]
npm error node_modules/@o3r/schematics
npm error peerOptional @o3r/schematics@"^11.6.0-rc.5" from @ama-sdk/[email protected]
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
The text was updated successfully, but these errors were encountered:
I actually used the ng update @o3r/[email protected] command to handle the upgrade, and it did install the @ama-sdk/* deps.
But the issue is that in a monorepo, the ng update only handles the root package.json file.
There is no harmonization with the app package.json file, so there is no choice but to manually update the app deps.
When updating the app deps, I actually did update the @ama-sdk/* deps, but somehow, because the old versions are still in package-lock.json file at the time I run my npm install, it fails. It seems like it does not handle multiple workspaces properly.
Running an npm install --force fixes the issue in this case, and after that all the deps are correct in both the root and the app (including the @ama-sdk/* ones).
Package name
core
Package version
11.5.6
Reproduction steps
Generate a project with an app:
Then, update all the
@o3r/x
dependencies in both the rootpackage.json
and the apppackage.json
files, to a newer version, for example version11.6.0-rc.2
.Then run
npm install
to install all these new versions.Current result
The
npm install
command fails: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
The text was updated successfully, but these errors were encountered: