DEV Community

Discussion on: How to create a React app without using create-react-app | a step by step guide

Collapse
 
nithincp profile image
Nithin Chandran P

Thank you for the wonderful and in-depth explanation.
I apologize for posting this comment a bit late. However, I would like to mention an issue I encountered. I believe that before starting the server, it is necessary to perform the build process, correct? I faced an issue stating 'module not found' initially. However, once I performed the build and then started the server, everything worked fine. Please confirm if I interpreted it correctly.

Collapse
 
ivadyhabimana profile image
Ivad Yves HABIMANA

Hi @nithincp when starting the server by running npm run start or npm start for short it is not necessary to build first. The npm run build command just creates an optimized version of your React code and bundles all your React files (code) into one JavaScript file that is sent to your index.html file, This should have no effect on your development environment.
I don't think it worked because you ran the build command because it should work even without it