anatine/zod-plugins

Unable to install

balkarika opened this issue · 2 comments

Clean nest project, tried to run: npm install openapi3-ts zod @anatine/zod-openapi @anatine/zod-nestjs

This is the result from the terminal
➜ apps npm install openapi3-ts zod @anatine/zod-openapi @anatine/zod-nestjs uat-okda-admin
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: undefined@undefined
npm ERR! Found: openapi3-ts@3.2.0
npm ERR! node_modules/openapi3-ts
npm ERR! openapi3-ts@"" from the root project
npm ERR! peer openapi3-ts@"^2.0.0 || ^3.0.0" from @anatine/zod-openapi@1.14.2
npm ERR! node_modules/@anatine/zod-openapi
npm ERR! @anatine/zod-openapi@"
" from the root project
npm ERR! peer @anatine/zod-openapi@"^1.10.0" from @anatine/zod-nestjs@2.0.2
npm ERR! node_modules/@anatine/zod-nestjs
npm ERR! @anatine/zod-nestjs@"" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer openapi3-ts@"^4.1.2" from @anatine/zod-nestjs@2.0.2
npm ERR! node_modules/@anatine/zod-nestjs
npm ERR! @anatine/zod-nestjs@"
" from the root project

from zod-nestjs 2.0.2 package.json:
"peerDependencies": {
"zod": "^3.20.0",
"openapi3-ts": "^4.1.2",
"@nestjs/common": "^7.0.0 || ^8.0.0 || ^9.0.0 || ^10.0.0",
"@nestjs/swagger": "^6.0.0 || ^7.0.0",
"@anatine/zod-openapi": "^1.10.0"
}

Seems to me that @anatine/zod-nestjs@2.0.2 still depends on @anatine/zod-openapi@"^1.10.0" but the lastest version of the zod-openapi is 2.0.1. The two different versions of zod-openapi depends on two different version of openapi3-ts

Here is a PR to fix it:
#155

this is my first PR for another project, hope I did it correctly

Thanks. Pulled in and released.