Skip to content
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

graphql-codegen/cli@2.16.4 needs ts-node #8814

Closed
numb86 opened this issue Jan 14, 2023 · 8 comments · Fixed by #8865
Closed

graphql-codegen/cli@2.16.4 needs ts-node #8814

numb86 opened this issue Jan 14, 2023 · 8 comments · Fixed by #8865

Comments

@numb86
Copy link

numb86 commented Jan 14, 2023

Which packages are impacted by your issue?

@graphql-codegen/cli

Describe the bug

Dependency for graphql-codegen/cli@2.16.4 x is incorrect.

Your Example Website or App

should occur in all environments.

Steps to Reproduce the Bug or Issue

$ mkdir foo
$ cd foo
$ yarn init -y
$ yarn add graphql@latest
$ yarn add @graphql-codegen/cli@2.16.4
$ yarn graphql-codegen

Error: Cannot find module 'ts-node'

Expected behavior

no error

Screenshots or Videos

No response

Platform

Platform doesn't matter

Codegen Config File

No response

Additional context

No response

@isoppp
Copy link

isoppp commented Jan 16, 2023

@jbsmith731
Copy link

Can confirm downgrading to 2.16.3 resolves the error

@ffxsam
Copy link

ffxsam commented Jan 17, 2023

Side note: simple testing could've prevented a broken release from going out to a highly-used npm package (1.4 million downloads per week).

@hussein-jaban
Copy link

I just yarn add ts-node it worked.

@n1ru4l
Copy link
Collaborator

n1ru4l commented Jan 30, 2023

This was caused by a minor bump that should have been a major bump within graphql-config.
I am right now working on reverting and releasing a patch version for graphql-config that will solve this.

In the meantime, the solutions mentioned in #8814 (comment) and #8814 (comment) work as temporary workarounds.

Please also note that ts-node is a peer dependency of codegen: #8779

The documentation does currently not reflect that

@n1ru4l
Copy link
Collaborator

n1ru4l commented Jan 30, 2023

Okay, #8865 moved ts-node from peer dependencies to dependencies! I will release new versions shortly. Sorry for the inconvenience.

Regarding #8814 (comment)
we will be moving to pnpm soon, which will make these kinds of dependency chain issues easier to track.

Any other additional smoke tets contribution would be highly appreciated.

@n1ru4l
Copy link
Collaborator

n1ru4l commented Jan 30, 2023

@graphql-codegen/cli@2.16.5

got released.

@vladshcherbin
Copy link

@n1ru4l thanks for taking care of it! 🙌

geiralund added a commit to navikt/dp-dagpenger that referenced this issue May 2, 2023
"@graphql-codegen/cli" 2.16.4  mangler ts-node - oppdaterte til versjon 2.16.5 ref dotansimha/graphql-code-generator#8814 (comment)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants