DEV Community

TheGuyHiding
TheGuyHiding

Posted on

2 1

React server taking too long to start up and unable to edit without shutting down server

I'm having an issue with npm start, it takes almost 2 minutes before the server starts and opens the page on my browser. Then whenever I make changes to my code then save it and reload the page, the server does not update the page with the new changes, thus forcing me to stop the server and restart it. I've look for solutions on stack overflow but was unable to solve my issue. Any support would be greatly appreciated.

Top comments (3)

Collapse
 
amn3s1a2018 profile image
Amn3s1a2018

You need to be more specific with your questions. At first read: stackoverflow.com/help/how-to-ask
If you ask better questions, you will get answers.
As already mentioned, there are many react starters. If you stuck with one, try another. Esbuild and Vite are nice options too, besides NextJs and Gatsby ...
Or maybe you should use npm run dev instead of npm start ;)

Collapse
 
theguyhiding profile image
TheGuyHiding

Turns out the problem wasn't react or npm, rather where I had my repo from GitHub. If you try running a react app from a location that doesn't contain the npm information it will more or less break. Regardless, thank you to all who responded.

Collapse
 
subhendu17620 profile image
Subhendu Maji

If you have bootstrapped the app with create-react-app, it comes with webpack bundler
Try 'esbuild' bundler esbuild.github.io/

Or
You can try vite app with react.
vitejs.dev/

Image of Quadratic

Free AI chart generator

Upload data, describe your vision, and get Python-powered, AI-generated charts instantly.

Try Quadratic free

👋 Kindness is contagious

Engage with a wealth of insights in this thoughtful article, valued within the supportive DEV Community. Coders of every background are welcome to join in and add to our collective wisdom.

A sincere "thank you" often brightens someone’s day. Share your gratitude in the comments below!

On DEV, the act of sharing knowledge eases our journey and fortifies our community ties. Found value in this? A quick thank you to the author can make a significant impact.

Okay