question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

`npx graphql-code-generator init` terminates after first wizard question

See original GitHub issue

Describe the bug

I install using pnpm as per the instructions and run pnpm graphql-code-generator init. It displays the first page/question of the wizard and then immediately returns me to command prompt, not allowing me to select any items or complete the wizard.

I also tried npx (npm v8.15.1), it does the same thing

Exact output:


    Welcome to GraphQL Code Generator!
    Answer few questions and we will setup everything for you.
  
? What type of application are you building? (Press <space> to select, <a> to toggle all, <i> to invert selection, and <enter> to proceed)
❯◯ Backend - API or server
 ◯ Application built with Angular
 ◯ Application built with React
 ◯ Application built with Stencil
 ◯ Application built with other framework or vanilla JS

That’s as far as it gets.

Your Example Website or App

N/A

Steps to Reproduce the Bug or Issue

Follow the instructions on https://www.graphql-code-generator.com/docs/getting-started/installation, using the “Initialization wizard” option for configuration.

Expected behavior

I expected the wizard to complete and configure my project.

Screenshots or Videos

No response

Platform

  • OS: Linux (Fedora 35 Silverblue)
  • NodeJS: 16.15.0
  • graphql version: 16.5.0
  • @graphql-codegen/cli version: 2.11.2
  • pnpm: v7.7.0
  • npm: 8.15.1
  • Shell: bash 5.1.8(1)-release (x86_64-redhat-linux-gnu)
  • Terminal: I tried kitty, gnome-terminal and vscode’s built in terminal

Codegen Config File

No response

Additional context

I should note that my development environment is run inside a podman-based Linux container. (This is how Silverblue works, using its “toolbox” system). I would not expect this to be an issue, but if anyone else using a more conventional Linux/bash environment (any distro) cannot reproduce, this might be the problem.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5

github_iconTop GitHub Comments

0reactions
x11xcommented, Jul 30, 2022

Works for me now in Linux/Bash, thanks.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Graphql Codegen Wizard Terminated Unexpected
When the time to run this command below, the script ended unexpectedly. I did not get a chance to answer the question. npx...
Read more >
Installation doesn't work? · Discussion #7680 - GitHub
I only can get it to work with npx graphql-codegen init which is not directly in the docs (or at least it's ambiguous,...
Read more >
Generating types from a GraphQL schema
We'll use the GraphQL Code Generator library to generate types based on our GraphQL schema. There are multiple ways to provide a schema...
Read more >
Installation - GraphQL Code Generator
Initialization Wizard. Once installed, GraphQL Code Generator CLI can help you configure your project based on some popular flows: yarn npm
Read more >
Working with GraphQL Code Generator and Hygraph
Next, run the initialization wizard. npx graphql-codegen init. You'll be asked a series of questions:.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found