-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Quickstart needs ts-node #8685
Comments
There is nothing in CLI that uses graphql-code-generator/packages/graphql-codegen-cli/package.json Lines 42 to 94 in 224a536
|
✨ This is an old work account. Please reference @brandonchinn178 for all future communication ✨ The CLI uses graphql-code-generator/packages/graphql-codegen-cli/src/config.ts Lines 77 to 79 in 224a536
It fails on Yarn because Yarn uses PnP and errors if packages try to access a package they don't mention in their dependencies: Did you try running through the repro steps I had in the issue? EDIT: current workaround is to update packageExtensions:
'@graphql-codegen/cli@*':
'ts-node': '*' but |
I'm also experiencing this, and it appears to be a duplicate of this slightly older open issue #8462. Per https://yarnpkg.com/advanced/error-codes#yn0002---missing_peer_dependency, this is a problem that should be fixed by Here's the
|
I'm also hitting this issue in a fresh project on Yarn 3. The workaround listed above should be: packageExtensions:
"@graphql-codegen/cli@*":
peerDependencies:
"ts-node": "*" The above should be added to your |
PR for a fix over here: #8779 |
Which packages are impacted by your issue?
No response
Describe the bug
The quickstart in the README + website are both missing
yarn add -D ts-node
, which is needed as a peer dependency of@graphql-codegen/cli
.Your Example Website or App
N/A
Steps to Reproduce the Bug or Issue
yarn set version stable
yarn add graphql && yarn add -D typescript && yarn add -D @graphql-codegen/cli
yarn graphql-codegen init
Expected behavior
Should work
Screenshots or Videos
No response
Platform
graphql
version: [e.g. 16.3.0]@graphql-codegen/*
version(s): [e.g. 2.6.2]Codegen Config File
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: