Open stomvi opened 3 months ago
This may have something to do with issue #7825.
It happens to me as well. #7825 is closed but it's still happening with "@graphql-codegen/cli": "^5.0.2",
In package-lock.json, you can see
"node_modules/relay-compiler": {
"version": "18.1.0",
"resolved": "https://registry.npmjs.org/relay-compiler/-/relay-compiler-18.1.0.tgz",
"integrity": "sha512-DGWIORIij0TIys/Xd5W/iToqTv7UcN6fqCPDqwYhLnfU7ukdK8rpk7f6RCYvhyZG71e7a1b3TLGOQY8A3XE3yg==",
"dev": true,
"bin": {
"relay-compiler": "cli.js"
}
},
and
"@ardatan/relay-compiler": {
"version": "12.0.0",
"resolved": "https://registry.npmjs.org/@ardatan/relay-compiler/-/relay-compiler-12.0.0.tgz",
"integrity": "sha512-9anThAaj1dQr6IGmzBMcfzOQKTa5artjuPmw8NYK/fiGEMjADbSguBY2FMDykt+QhilR3wc9VA/3yVju7JHg7Q==",
"dev": true,
...
@ardatan/relay-compiler is a dependency of @graphql-tools/relay-operation-optimizer, which is a dependency of @graphql-codegen/visitor-plugin-common, which is dependency of @graphql-codegen/client-preset
I can work around the issue by specifying the latest relay node module cli.js
"relay": "node node_modules/relay-compiler/cli.js",
Which packages are impacted by your issue?
@graphql-codegen/cli
Describe the bug
Installed with
relay-compiler
will causenpm i -D relay-compiler@latest
to install v12 instead of the latest one, which is v17 now.Your Example Website or App
Provide a minimal
package.json
belowSteps to Reproduce the Bug or Issue
The minimal
package.json
isand
shows
12.0.0
Expected behavior
Should install
relay-compiler@17.0.0
at this point, not v12.Screenshots or Videos
No response
Platform
graphql
version: not relevant@graphql-codegen/*
version(s): v5.0.2Codegen Config File
No response
Additional context
No response