[Bug]: After `@ogma/logger@2.4.1`, peer deps of `@ogma/platform-fastify@4.0.0` can’t be resolved
See original GitHub issueIs there an existing issue for this?
- I have searched the existing issues
Current behavior
I get some peer dependency issues which I can’t resolve by myself.
When running npm i @ogma/logger@latest @ogma/nestjs-module@latest @ogma/platform-fastify@latest @ogma/platform-tcp@latest
in a new empty folder with the default package.json
(output of npm init -y
), it installed @ogma/logger@2.3.0
(the other packages are of latest version), it completes successfully (obviously). However, when I install @ogma/logger@2.3.0
, it fails (due to peer deps issues above). When I force it (using --force
), it completes successfully (albeit with warnings), however, any subsequent installations of any packages won’t complete unless forced.
Now, in node_modules/@ogma/platform-fastify/package.json
, I have the following:
"peerDependencies": {
"@nestjs/platform-fastify": "^9.0.0",
"@ogma/nestjs-module": "^4.0.0",
"fastify": ">=4.0.0",
"@ogma/logger": "2.3.0",
"@ogma/common": "1.1.0",
"@ogma/styler": "1.0.0"
},
however, in packages/platform-fastify/package.json
, there is no @ogma/logger
/@ogma/common
/@ogma/styler
peer dependency:
Note that this could be an issues in other packages in this repository, however, I use only four packages (listed in the title of this issue and in the list of package versions).
Minimum reproduction code
not needed
Steps to reproduce
- Create a folder and enter it.
npm init -y
.- [works, but installs
@ogma/logger/2.3.0
]npm i @ogma/logger@latest @ogma/nestjs-module@latest @ogma/platform-fastify@latest @ogma/platform-tcp@latest
- [fails]
npm i @ogma/logger@2.4.1 @ogma/nestjs-module@latest @ogma/platform-fastify@latest @ogma/platform-tcp@latest
- [works with warnings]
npm i --force @ogma/logger@2.4.1 @ogma/nestjs-module@latest @ogma/platform-fastify@latest @ogma/platform-tcp@latest
Expected behavior
No peer dependency issues.
Package(s) version
@ogma/logger
:2.4.1
;@ogma/nestjs-module
:4.2.0
;@ogma/platform-fastify
:4.0.0
;@ogma/platform-tcp
:4.0.0
.
Node.js version
19.0.0
In which operating systems have you tested?
- macOS
- Windows
- Linux
Other
See the logs below:
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: @ogma/platform-fastify@4.0.0
npm ERR! Found: @ogma/logger@2.4.1
npm ERR! node_modules/@ogma/logger
npm ERR! peer @ogma/logger@"^2.0.0" from @ogma/nestjs-module@4.1.1
npm ERR! node_modules/@ogma/nestjs-module
npm ERR! peer @ogma/nestjs-module@"^4.0.0" from @ogma/platform-fastify@4.0.0
npm ERR! node_modules/@ogma/platform-fastify
npm ERR! @ogma/platform-fastify@"4.0.0" from the root project
npm ERR! peer @ogma/nestjs-module@"^4.0.0" from @ogma/platform-tcp@4.0.0
npm ERR! node_modules/@ogma/platform-tcp
npm ERR! @ogma/platform-tcp@"4.0.0" from the root project
npm ERR! 1 more (the root project)
npm ERR! @ogma/logger@"2.4.1" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer @ogma/logger@"2.3.0" from @ogma/platform-fastify@4.0.0
npm ERR! node_modules/@ogma/platform-fastify
npm ERR! @ogma/platform-fastify@"4.0.0" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: @ogma/logger@2.3.0
npm ERR! node_modules/@ogma/logger
npm ERR! peer @ogma/logger@"2.3.0" from @ogma/platform-fastify@4.0.0
npm ERR! node_modules/@ogma/platform-fastify
npm ERR! @ogma/platform-fastify@"4.0.0" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR! See /home/ts/.npm/eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/ts/.npm/_logs/2022-10-28T13_40_45_340Z-debug-0.log
Issue Analytics
- State:
- Created a year ago
- Comments:5 (5 by maintainers)
Top GitHub Comments
Just to make this easier to double check for me, once the value in the
worksapce.json
was updated for the projects, these are the newpeerDependencies
for each packagePeer Deps Per Project
Okay, looks like I can use
updateBuildableProjectDepsInPackageJson: false
in the workspace.json to fix this. I’ll want to double check with some tinkering, but I think I should be able to have a fix up for this within a day or so