Why Next local server is not working 😔?
When I run npm run dev in the terminal it doesn't show any error and my Next project starts running at port: 3000.
When open localhost:3000 in my browser it keeps loading and then show unable to connect. Please me anybody.
10 Replies
Are you using the same machine for the browser and the server? What is shown after starting the server?
Yes I'm using same machine.
I'm terminal there is no error shown. But in browser window I just see that "Unable to connect"
is there any output at all in the terminal? can you show a screenshot?
Just started new project but same problem
I have removed all the default next home template that we see on startup in page.js file
And then refreshed that page on browser it started reloading for long time. And it stops without showing any error.
"all" might be too much to remove, not sure though
what does your page.js look like before and after?
Page.js contains all the code for design that I have shared above.
And then I removed code for this design return just simple text but it didn't worked
can you share the contents of page.js after you removed everything?
just copy/paste it into a codeblock here, you can start it with ```js, then on the next line paste everything, then on a line below that add ```
Page.js file just contains:
function Home(){
return (
<h1>Home Page</h1>
)
}
export default Home;
hm, then I'm not sure if I'm honest. You made no other changes to other files?
If someone with more Next knowledge comes around, they might have an idea
No even didn't touched
When I was working on a project yesterday it was gonna well. But today in morning when I get back to my work and started project there was error that told you.