create-react-app
                                
                                 create-react-app copied to clipboard
                                
                                    create-react-app copied to clipboard
                            
                            
                            
                        This is my first time learning react. I got to the stage of using JSX method where I have to import React from "react" but it keeps throwing this error in my console: "Cannot use import statement outside a module". Please help me with the issue
Describe the bug
(Write your answer here.)
Did you try recovering your dependencies?
(Write your answer here.)
Which terms did you search for in User Guide?
(Write your answer here if relevant.)
Environment
(paste the output of the command here.)
Steps to reproduce
(Write your steps here:)
Expected behavior
(Write what you thought would happen.)
Actual behavior
(Write what happened. Please add screenshots!)
Reproducible demo
(Paste the link to an example project and exact instructions to reproduce the issue.)
please kindly provide more information about this bug
I suggest you use the vite template instead. Create-react-app is too deprecated to be used as a tool for building react apps.
You can run the command:
npm init vite and choose the react template