I am in Lesson 10 “Building images“ and receive the folloing error message while starting the react app with the command “npm start”. see screenshot.
what went wrong? what can I do to solve the problem — any suggestions?
Looking forward hearing from you
This is weird.
The structure of a React project is (amongst others)
You must type npm start from the place where the packages.json is located.
Now it looks your packages.json is within the src folder…
Did you do the
npm install step prior to start ?
Thank you for your answer and concern.
I installed npm again, started npm and received the following messages see screenshot
Did you try the steps given ?
no success have a similar error message
What should you
npm start from the parent folder react-app?
did i get you right, that is important to have various files in the “right” directory?
please see screenshot attached
Well I do not have such expertise to tell where is the “right” place.
That said I have the expertise of having worked with a few React projects.
Always the package.json is under the project folder at the same level as src folder.
Just one example of a project of mine.
From that point of view something seems off in your project. I can’t tell if it is really.
I always used
create-react-app to scaffold a project. Be sure to use
npx command instead of
npm for that operation.
This is part of the official docs.
npx create-react-app my-app
Thank you for your concern and suggestions!
I am happy I tried your suggestions and it works!!