Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

NextJS extremely slow

Tags:

next.js

I'm working on a website on nextjs but the Link component and the router is kinda driving me crazy. When I click on a link it has an horrible delay before accessing the page and then if you use the browser back button the page don't change, just the url.

like image 473
ogtm Avatar asked Jan 18 '26 12:01

ogtm


1 Answers

It is common for Next.js and other frameworks as well to be slow in development time. As I can see and confirm in your production live website, the links work well, even great. That it because in development there are certain tools and packages being used by Next.js and webpack to compile on-fly the code. Those tools are disabled and removed in a production build of course, and the pages are cached by Next.js.

So, try to run npm run dev and compare it with npm run build, followed by npm run start

like image 53
georgekrax Avatar answered Jan 20 '26 05:01

georgekrax



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!