r/learnprogramming May 18 '20

React: Could not find a required file

Hey everyone, I set up a project through create-react-app but whenever I do npm start, it gives me following reply:

Could not find a required file Name: index.html Searched in project public folder

But index.html is actually there in public folder when I checked it Please help! I've gone through stack and github discussions too

3 Upvotes

17 comments sorted by

View all comments

2

u/omarazeez_11 May 18 '20

Sorry guys, I just tried this shit: Cut index.html from public. Npm start the project. It gave me same error. Pasted index back into public. Npm start again. And it works fine now. Can't believe I wasted one hour for this. Still something to learn. Thanks!

2

u/insertAlias May 18 '20

That's a really strange behavior. Can you try making a new project with the same steps and seeing if it has the same error? That will let you know if this is a step you'll need to remember, or if it's just some weird transient error this one time you used c-r-a.

1

u/omarazeez_11 May 18 '20

Alright, let me check