# Gap in Git Bash when run node

**URL:** <https://forum.freecodecamp.org/t/gap-in-git-bash-when-run-node/278203>\
**Category:** General\
**Created:** [May 18, 2019, 6:02pm UTC](https://forum.freecodecamp.org/t/gap-in-git-bash-when-run-node/278203 "2019-05-18T18:02:42Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Stas761](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/stas761/32/84088_2.png) [@Stas761](https://forum.freecodecamp.org/u/Stas761)\
**Post date:** [May 18, 2019, 6:02pm UTC](https://forum.freecodecamp.org/t/gap-in-git-bash-when-run-node/278203/1 "2019-05-18T18:02:42Z")

</div>

Hello,  
I’m trying to use Node.js and I run it on Git Bash but when I run it I got an annoying gap  
like this  
How to skip it?

 ![Untitled](https://global.discourse-cdn.com/freecodecamp/original/3X/6/e/6ede996b06d01b6515e020d0b43f2bb08cb579e7.jpeg)

---

<div class="post-metadata">

**Author:** ![jamesperrin](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/jamesperrin/32/158725_2.png) [@jamesperrin](https://forum.freecodecamp.org/u/jamesperrin)\
**Post date:** [June 5, 2019, 8:06pm UTC](https://forum.freecodecamp.org/t/gap-in-git-bash-when-run-node/278203/2 "2019-06-05T20:06:51Z")

</div>

What are you trying to do? Run a node app?

---

<div class="post-metadata">

**Author:** ![Stas761](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/stas761/32/84088_2.png) [@Stas761](https://forum.freecodecamp.org/u/Stas761)\
**Post date:** [June 5, 2019, 8:23pm UTC](https://forum.freecodecamp.org/t/gap-in-git-bash-when-run-node/278203/3 "2019-06-05T20:23:44Z")

</div>

Yes When I am trying to run node on gitbush I always get this annoying gap.

---

<div class="post-metadata">

**Author:** ![Dereje1](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/dereje1/32/63598_2.png) [@Dereje1](https://forum.freecodecamp.org/u/Dereje1)\
**Post date:** [June 5, 2019, 10:12pm UTC](https://forum.freecodecamp.org/t/gap-in-git-bash-when-run-node/278203/4 "2019-06-05T22:12:16Z")

</div>

Just tried it and I don’t get the gap, but it was acting a little weird… just curious, why run node on git bash and not just regular old powershell ? Is there some functionality you can do on the former that you can’t on the latter ?

---

<div class="post-metadata">

**Author:** ![jamesperrin](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/jamesperrin/32/158725_2.png) [@jamesperrin](https://forum.freecodecamp.org/u/jamesperrin)\
**Post date:** [June 5, 2019, 10:31pm UTC](https://forum.freecodecamp.org/t/gap-in-git-bash-when-run-node/278203/5 "2019-06-05T22:31:24Z")

</div>

If you are trying to run a node app, you need to execute the below command. This is similar to any programming language.

Node.js

```auto
node app.js

```

Python

```auto
python app.py

```

---

<div class="post-metadata">

**Author:** ![Dereje1](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/dereje1/32/63598_2.png) [@Dereje1](https://forum.freecodecamp.org/u/Dereje1)\
**Post date:** [June 6, 2019, 12:30am UTC](https://forum.freecodecamp.org/t/gap-in-git-bash-when-run-node/278203/6 "2019-06-06T00:30:29Z")

</div>

@jamesperrin his screen shot shows that he just trying to run a node environment not an app, typing `node` without any arguments lets you run the node environment in the command line, just as typing `python` let’s you run the python environment in the command line.

---

<div class="post-metadata">

**Author:** ![jamesperrin](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/jamesperrin/32/158725_2.png) [@jamesperrin](https://forum.freecodecamp.org/u/jamesperrin)\
**Post date:** [June 6, 2019, 1:55am UTC](https://forum.freecodecamp.org/t/gap-in-git-bash-when-run-node/278203/7 "2019-06-06T01:55:40Z")

</div>

Right, but he said he doesn’t like it when you type **node** which then puts him in the node environment.

> I’m trying to use Node.js and I run it on Git Bash but when I run it I got an annoying gap  
> like this  
> How to skip it?

---

<div class="post-metadata">

**Author:** ![Dereje1](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/dereje1/32/63598_2.png) [@Dereje1](https://forum.freecodecamp.org/u/Dereje1)\
**Post date:** [June 6, 2019, 2:04am UTC](https://forum.freecodecamp.org/t/gap-in-git-bash-when-run-node/278203/8 "2019-06-06T02:04:53Z")

</div>

Like what? He wants to get rid of the gap in the CL when running the node environment in git bash, I wasn’t able to duplicate the gap on my system, can you?

---

<div class="post-metadata">

**Author:** ![jamesperrin](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/jamesperrin/32/158725_2.png) [@jamesperrin](https://forum.freecodecamp.org/u/jamesperrin)\
**Post date:** [June 6, 2019, 3:24pm UTC](https://forum.freecodecamp.org/t/gap-in-git-bash-when-run-node/278203/9 "2019-06-06T15:24:02Z")

</div>

The posters screenshot is show them in the Node interactive mode.

Yes, occurs regardless if it’s Node, Python or Ruby. Just typing the language’s name will jump you into their interactive mode.

---

<div class="post-metadata">

**Author:** ![lionel-rowe](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/lionel-rowe/32/41877_2.png) [@lionel-rowe](https://forum.freecodecamp.org/u/lionel-rowe)\
**Post date:** [June 9, 2019, 10:25am UTC](https://forum.freecodecamp.org/t/gap-in-git-bash-when-run-node/278203/10 "2019-06-09T10:25:41Z")

</div>

@Stas761 What versions of Node.js and Git are you using? You can check using `node --version` and `git --version`.

I’m not able to reproduce the bug with these versions:

```bash
$ node --version
v10.16.0

$ git --version
git version 2.14.1.windows.1

```

* * *

> [@Dereje1](#):
>
> why run node on git bash and not just regular old powershell ? Is there some functionality you can do on the former that you can’t on the latter ?

There are quite a few differences:

> **[PowerShell vs. Bash: Key differences explained | TechTarget](https://www.techtarget.com/searchitoperations/tip/On-Windows-PowerShell-vs-Bash-comparison-gets-interesting)**
>
> This Windows PowerShell vs. Bash assessment takes into account the two scripting shells' target users on Windows, capabilities and command syntax.

tl;dr: Git Bash is faster, lighter, less powerful, and more Unix-ey. Some widely-used Linux commands that come with Git Bash, such as `grep`, `touch`, and `less`, don’t work on PowerShell (though I assume it has its own equivalents).

---

<div class="post-metadata">

**Author:** ![Dereje1](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/dereje1/32/63598_2.png) [@Dereje1](https://forum.freecodecamp.org/u/Dereje1)\
**Post date:** [June 9, 2019, 12:03pm UTC](https://forum.freecodecamp.org/t/gap-in-git-bash-when-run-node/278203/11 "2019-06-09T12:03:02Z")

</div>

> [@lionel-rowe](#):
>
> tl;dr: Git Bash is faster, lighter, less powerful, and more Unix-ey. Some widely-used Linux commands that come with Git Bash, such as `grep` , `touch` , and `less` , don’t work on PowerShell (though I assume it has its own equivalents).

Ah so it’s for using linux bash shell on windows and not git itself as git commands are already available in PowerShell with any git installation in windows.  
Anyway in this day and age, I’d recommend installing a linux bash shell which is freely available in the store for Windows 10 (which looks like the OP is using) , one can then switch to a bash shell by simply typing `bash` in PS, unlike the old days where you had to use cygwin or a HD partition installation of a linux system, this way you not only get a bash shell, but also a full layer to run linux applications.

---

<div class="post-metadata">

**Author:** ![ILM](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/ilm/32/363239_2.png) [@ILM](https://forum.freecodecamp.org/u/ILM)\
**Post date:** [January 17, 2021, 9:50am UTC](https://forum.freecodecamp.org/t/gap-in-git-bash-when-run-node/278203/12 "2021-01-17T09:50:11Z")

</div>

Closed on January 17, 2021, 9:50am UTC


