Simple Fix Long Page Compile Times When You Upgrade To Next Js 14

preview_player
Показать описание
I recently upgraded to next js 14 for my side porject. But my page compile times locally were extremely slow taking longer than 11 seconds 12 seconds. I upgraded my node version to fix this and thought I might share it incase it fixes it for other people as well.
Maybe its just a problem with the upgrade itself and theyll fix it in future updates.

But hope it helps you :D
Рекомендации по теме
Комментарии
Автор

That one jobless friend who codes and said “look, look what just I found”😂

gautampatoliya
Автор

Worked properly after I changed the node version. Thanks a lot!

joaolucasdossantos
Автор

same issue..downgraded from 21 to 20.15 (lts) but didn't work

pablom
Автор

I was on exactly 18.17.0 and moved to 20.9.0 and it made absolutely no difference. My initial compile time was 26.9s and after changing versions it was also exactly 26.9s

reprovedcandy
Автор

The best speed improvement that I recently found is to use the turbo mode.

On the package json scripts use

dev: next dev --turbo

LomasDelMaiten
Автор

I was on Node js v20.11.0 and i upgraded to v20.11.1. Now my pages load faster and it seems the solution is to always upgrade my node js version to the latest, but how will I take care of that after deployment? Anyway the video was helpful and I just became a subscriber.

iangithinji
Автор

Mine was slow because of the old @next/font after the upgrade. Luckily sorting this out was quick

nardu
Автор

( 2998 modules, 3s ) I think it's still slow.

IlllIlIlllIIIllIl