# Sharing Source Code. Git Bash. Multiple Issues & Solutions

**URL:** <https://forum.codewithmosh.com/t/sharing-source-code-git-bash-multiple-issues-solutions/20145>\
**Category:** Docker\
**Created:** [May 9, 2023, 10:54am UTC](https://forum.codewithmosh.com/t/sharing-source-code-git-bash-multiple-issues-solutions/20145 "2023-05-09T10:54:31Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![chrisk](https://avatars.discourse-cdn.com/v4/letter/c/6de8d8/32.png) [@chrisk](https://forum.codewithmosh.com/u/chrisk)\
**Post date:** [May 9, 2023, 10:54am UTC](https://forum.codewithmosh.com/t/sharing-source-code-git-bash-multiple-issues-solutions/20145/1 "2023-05-09T10:54:31Z")

</div>

`docker run -d -p 5001:3000 -v $(pwd):/app react-app`

Pulled my hair out over this one…

Below I walk through the issues I encountered using Git Bash with solutions… hope it’ll save someone some time.

**1st issue** : my pwd path had a space in it  
**Solution** : wrap “$(pwd):/app” in quotes

**2nd issue** :  
`Error: sh: react-scripts: not found`

Reason: it can’t find node\_modules dir (cause host gets mirrored but doesn’t have node\_modules)

**Solution** (thanks @jediampm):  
[https://forum.codewithmosh.com/t/docker-section-5-working-with-containers-lesson-11-error-and-solution/6380](https://forum.codewithmosh.com/t/docker-section-5-working-with-containers-lesson-11-error-and-solution/6380)

**3rd issue** : App runs in browser but changes in Host are not applied to dir in container (I believe due to permission issue)

**Solution** (thank you chat gpt):

`docker inspect -f “{{.Mounts}}” <container id>`  
(this showed “rprivate” at the end, which apparently indicates a permission issue)

`docker run -d -p 5000:3000 -v "$(pwd)/src:/app/src:rshared" react-app`

**4th issue** : Changes in Host dir are applied to dir in Container BUT won’t show in browser  
**Solution** : add this line to scripts object inside package.json (then re-build image)

```auto
"scripts": {
        "start": " **CHOKIDAR_USEPOLLING=true** react-scripts start", //add this line
        "build": "react-scripts build",
        "test": "react-scripts test",
        "eject": "react-scripts eject"
}

```

[https://stackoverflow.com/a/70017772](https://stackoverflow.com/a/70017772)

**5th issue** : container runs, but browser indicates permission issue  
**Solution** : delete node\_modules dir in Host directory  
[https://stackoverflow.com/a/70745080](https://stackoverflow.com/a/70745080)

6h later I had the desired mapping btw host and container…

Hope it helps someone.

---

<div class="post-metadata">

**Author:** ![dimanjenje](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.codewithmosh.com/dimanjenje/32/331_2.png) [@dimanjenje](https://forum.codewithmosh.com/u/dimanjenje)\
**Post date:** [November 9, 2023, 7:02pm UTC](https://forum.codewithmosh.com/t/sharing-source-code-git-bash-multiple-issues-solutions/20145/2 "2023-11-09T19:02:10Z")

</div>

Im facing the 4th issue, I create the volume (bind), the changes in the host are applied in the container But doesnt show in the browser (unless I create another container). I applied the sugested soluction “start”: “ **CHOKIDAR\_USEPOLLING=true** react-scripts start” but didnt work. Still this a valid solution?  
Im using

- docker : 24.0.6
- react: 18.2
- node: 20.9 and npm version: 10.10
