# 12- Defining Entrypoints: Failed to compile. 'React' must be in scope when using JSX react/react-in-jsx-sco

**URL:** <https://forum.codewithmosh.com/t/12-defining-entrypoints-failed-to-compile-react-must-be-in-scope-when-using-jsx-react-react-in-jsx-sco/20064>\
**Category:** Docker\
**Created:** [May 5, 2023, 11:59pm UTC](https://forum.codewithmosh.com/t/12-defining-entrypoints-failed-to-compile-react-must-be-in-scope-when-using-jsx-react-react-in-jsx-sco/20064 "2023-05-05T23:59:48Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![j\_bi](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.codewithmosh.com/j_bi/32/6215_2.png) [@j\_bi](https://forum.codewithmosh.com/u/j_bi)\
**Post date:** [May 5, 2023, 11:59pm UTC](https://forum.codewithmosh.com/t/12-defining-entrypoints-failed-to-compile-react-must-be-in-scope-when-using-jsx-react-react-in-jsx-sco/20064/1 "2023-05-05T23:59:48Z")

</div>

I can’t run the command: docker build -t react-app .  
here’s what it says:

[+] Building 1.3s (11/11) FINISHED  
=\> [internal] load build definition from Dockerfile 0.1s  
=\> =\> transferring dockerfile: 32B 0.0s  
=\> [internal] load .dockerignore 0.1s  
=\> =\> transferring context: 34B 0.0s  
=\> [internal] load metadata for [Docker](http://docker.io/library/node:14.16.0-alpin) 1.0s  
=\> [auth] library/node:pull token for [registry-1.docker.io](http://registry-1.docker.io) 0.0s  
=\> [1/5] FROM docker .io/library/node:14.16.0-alpine3.13@sha256:2c51d 0.0s  
=\> [internal] load build context 0.1s  
=\> =\> transferring context: 4.48kB 0.0s  
=\> CACHED [2/5] WORKDIR /app 0.0s  
=\> CACHED [3/5] COPY . . 0.0s  
=\> CACHED [4/5] RUN npm install 0.0s  
=\> CACHED [5/5] RUN addgroup app && adduser -S -G app app 0.0s  
=\> exporting to image 0.1s  
=\> =\> exporting layers 0.0s  
=\> =\> writing image sha256:ed782e67f8468964e64e7958eb6ab96144caa5a91 0.0s  
=\> =\> naming to docker .io/library/react-app 0.0s

Use ‘docker scan’ to run Snyk tests against images to find vulnerabilities and learn how to fix them  
PS C:\Users\yousi\Documents\Docker Tutorials for Beginners\Section 4- Images\section4-react-app\> docker run react-app npm start

> react-app@0.1.0 start /app  
> react-scripts start

Starting the development server…

Failed to compile.

./src/App.js  
Line 6: ‘React’ must be in scope when using JSX react/react-in-jsx-scope  
Line 7: ‘React’ must be in scope when using JSX react/react-in-jsx-scope  
Line 8: ‘React’ must be in scope when using JSX react/react-in-jsx-scope  
Line 9: ‘React’ must be in scope when using JSX react/react-in-jsx-scope  
Line 10: ‘React’ must be in scope when using JSX react/react-in-jsx-scope  
Line 12: ‘React’ must be in scope when using JSX react/react-in-jsx-scope

Search for the keywords to learn more about each error.
