1

I attach an image and text of the problem: what happens is that, when executing an npm command like creating a new astro project, the git bash console duplicates the content.

Is there anyone who is so kind to help me or who has had this error and how to solve it?
It is on windows 10

https://i.stack.imgur.com/acyXV.png

Git Bash
Empty project
? Which template would you like to use? » - Use arrow-keys. Return to submit. 
Just the basics (recommended)
Blog
Portfolio
Documentation Site
Empty project
? Which template would you like to use? » - Use arrow-keys. Return to submit. 
Just the basics (recommended)
Blog
Portfolio
Documentation Site
Empty project
? Which template would you like to use? » - Use arrow-keys. Return to submit.
Just the basics (recommended)
Blog
Portfolio
Documentation Site
Empty project
? Which template would you like to use? » - Use arrow-keys. Return to submit.
Just the basics (recommended)
Blog
Portfolio
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
FrxnDev
  • 17
  • 4

1 Answers1

0

It depends on the npm program used (probably withastro/astro in your case).

But since git bash does not provide a good experience, try first the same npm command in a regular CMD, to check if the issue persists.

The OP FrxnDev reports in the comments:

I found the problem, and when I run the git bash on mintty I get that error, but if I run the bash.exe that is inside /bin that mail on CMD, I don't get that problem.

As I mentioned in the comments below, using Git bin\bash.exe should work indeed. That is what I suggested in "Git Bash (mintty) is extremely slow on Windows 10 OS".

Mintty is the Cygwin Terminal emulator, and Git for Windows does not use it, but is a mingw64 binary.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • The problem is terminal of git bash, when I run the same command in the cmd terminal of windows it runs it correctly without duplicating anything. That's my problem, I don't know if anyone has had the same problem and how to solve it. – FrxnDev Oct 09 '22 at 14:29
  • @FrxnDev I understand. Can you try and use a simplified `PATH` ([as in here](https://stackoverflow.com/a/73391656/6309), add also the PATH for `npm`) from a CMD, and type in it: `bash`. In that bash session, does the issue persists? – VonC Oct 09 '22 at 20:51
  • I found the problem, and when I run the git bash on mintty I get that error, but if I run the bash.exe that is inside /bin that mail on CMD, I don't get that problem. – FrxnDev Oct 10 '22 at 00:15
  • @FrxnDev Thank you for your feedback. I have included your comment in the answer for more visibility, as well as several additional links. – VonC Oct 10 '22 at 06:08