You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Handle non interactive TTYs (like Git Bash on Windows) #554
When using Git Bash in Windows, the init fails with the following:
The above error occurred in the <TabIndexProvider> component:
in TabIndexProvider
in div (created by Box)
in Box
in App
React will try to recreate this component tree from scratch using the error boundary you provided, App.
Seems to work fine with the standard command line.
Reacted by ocboogie, Fabian Meyertöns, François VEAUVY, Kristóf Poduszló and Bojan Joveski
I renamed this issue to become a feature requests that can be added to the CLI. Until this is implemented, we unfortunately do not support non interactive TTYs like Git Bash on Windows.
Rereading this issue here, is it possible that the actual error message is missing? Usually the "The above error..." refers to something output right before - but here there is nothing.
I am not really, but that's fine. In exchange you have to explain the usecase of prisma2 init in a docker compose or kubernetes environment to me - then I might be able to help out ;)
Sure!
I want to be able to load up my database, prisma2, and app as separate containers. See this docker-compose.yml file.
Unfortunately, when I try and run it I get the following error:
Which has to do with the fact that interactive windows don't work. Ultimately, I want to be able to run Prisma in a Kubernetes environment and the first step is getting it to work correctly in a Docker Compose environment.
This is my current folder structure. I had to add a package.json file to my prisma folder just to be able to get it to run.
Activity
[-]Init fails in Windows with GIT Bash[/-][+][Windows] `init` fails in Windows with GIT Bash[/+]janpio commentedon Sep 14, 2019
I can confirm this:
Thanks for reporting.
pantharshit00 commentedon Sep 15, 2019
This was reported a few days ago(#401) but was closed because we thought it should have been fixed by the rewrite.
I think it is solely related to Git Bash being a non-interactive TTY.
[-][Windows] `init` fails in Windows with GIT Bash[/-][+]Handle non interactive TTYs[/+]janpio commentedon Sep 17, 2019
I renamed this issue to become a feature requests that can be added to the CLI. Until this is implemented, we unfortunately do not support non interactive TTYs like Git Bash on Windows.
[-]Handle non interactive TTYs[/-][+]Handle non interactive TTYs (like Git Bash on Windows)[/+]pantharshit00 commentedon Sep 17, 2019
@ttsirkia You can use https://hyper.is if you are using Git Bash as a replacement. That one is a good interactive TTY
divyenduz commentedon Sep 20, 2019
Internal note: dropping because of product priority
4 remaining items
janpio commentedon Oct 5, 2019
I just researched ink in non interactive TTYs for something related, but as this information might be relevant here as well I will just dump it:
You can reproduce the problem in an interactive TTY quite simply:
echo "foo" | prisma2 -vworksecho "foo" | prisma2 init foodoes notPossibly related ink stuff:
vadimdemedes/ink#40
https://github.com/vadimdemedes/ink/pull/42/files
Some more info around related things:
vadimdemedes/ink#166
vadimdemedes/ink#172
Our probably affected file:
https://github.com/prisma/prisma2/blob/4aef53c9db0f02af5351d90facb08de184237865/cli/ink-components/src/hooks/useStdin.ts
Rereading this issue here, is it possible that the actual error message is missing? Usually the "The above error..." refers to something output right before - but here there is nothing.
ViableClanMember commentedon Oct 14, 2019
Another solution is to try
winpty bashbeforeprisma2janpio commentedon Oct 15, 2019
Interesting suggestion @ViableClanMember. Unfortunately this gives me:
in Git Bash on Windows 10. Am I doing it wrong? But I am also getting it on
$ winpty bash prisma2 -v, so this doesn't seem to work for me in general.MikeyUchiha commentedon Dec 7, 2019
@janpio Not sure if you're the best person to ask but can you please add this to the roadmap? It's a big blocker to use this in Docker Compose and Kubernetes.
It's even referenced in your limitations documentation here: https://github.com/prisma/prisma2/blob/master/docs/limitations.md
And yet doesn't seem to be being worked on at all.
janpio commentedon Dec 7, 2019
I am not really, but that's fine. In exchange you have to explain the usecase of
prisma2 initin a docker compose or kubernetes environment to me - then I might be able to help out ;)MikeyUchiha commentedon Dec 7, 2019
Sure!
I want to be able to load up my database, prisma2, and app as separate containers. See this docker-compose.yml file.
Unfortunately, when I try and run it I get the following error:

Which has to do with the fact that interactive windows don't work. Ultimately, I want to be able to run Prisma in a Kubernetes environment and the first step is getting it to work correctly in a Docker Compose environment.
This is my current folder structure. I had to add a package.json file to my prisma folder just to be able to get it to run.
pantharshit00 commentedon Dec 9, 2019
You are running the dev command inside the container. I will not recommend that.
Also, you can get an interactive prompt in docker with the -i flag.
MikeyUchiha commentedon Dec 14, 2019
@pantharshit00 I should be able to just run a command in kubernetes and docker in a ci/cd pipleline.
MikeyUchiha commentedon Dec 14, 2019
requiring someone to have to create an interactive docker isn't possible in kubernetes.
Jolg42 commentedon Feb 14, 2020
The
initcommand is not interactive anymore and we check if we are in a TTY env in the code when appropriate.When I tried on Windows recently it was working.