Slow Load Times
Unanswered
Tamaskan Dog posted this in #help-forum
Tamaskan DogOP
Hey, Im using nextJS App ROuter with static routing (routes are being defined by the folder structure), running the dev server takes hell lot of time and navigating between routes .. compiling the resources takes more seconds
Tech : nextjs app router + postgres
Need some urgent help ..
PS: i use Windows, intel i7 8th machine
Tech : nextjs app router + postgres
Need some urgent help ..
PS: i use Windows, intel i7 8th machine
29 Replies
@Tamaskan Dog Hey, Im using nextJS App ROuter with static routing (routes are being defined by the folder structure), running the dev server takes hell lot of time and navigating between routes .. compiling the resources takes more seconds
Tech : nextjs app router + postgres
Need some urgent help ..
PS: i use Windows, intel i7 8th machine
during developement the dev server can be quite slow. In production it's way faster. For your dev server you can add the
--turbopack flag to your start command like npm run-script dev --turbopack. Like that you are using the turbo compiler and not the webpack compiler anymoreTamaskan DogOP
$ yarn dev
error: unknown option '--turbopack'
error: unknown option '--turbopack'
@Tamaskan Dog Click to see attachment
Run the command and show your console. You may need to upgrade to nextj15
Tamaskan DogOP
@Tamaskan Dog Click to see attachment
what nextjs version are you using? If you are using nextjs15 try the
--turbo flagTamaskan DogOP
14.2
@Tamaskan Dog 14.2
Upgrade to next15
Tamaskan DogOP
not necessarily need to upgrade right ?
@Tamaskan Dog?
Tamaskan DogOP
Hey , Im using Next js App Router , i'm trying to clone a open source repo of Umami for checking the analytics .. which use App Router by default ..
And the dev server is slow , i guess is it due to usage of more client side components 'use client' ??
@Tamaskan Dog And the dev server is slow , i guess is it due to usage of more client side components 'use client' ??
that may or may not be the reason, yea. The dev server is always waaay slower than in production, as it compiles during runtime. You can use a different compiler to make it faster. Upgrading the repo is one possible solution. Another one would be to use the turbopack. You decide what's suites best for you
Tamaskan DogOP
i tried configuring trubopack, but i guess there's a conflict between webpack and turbopack and its throwing error , (webpack comes by Nextjs default right ??)
@Tamaskan Dog i tried configuring trubopack, but i guess there's a conflict between webpack and turbopack and its throwing error , (webpack comes by Nextjs default right ??)
you are right. webpack is the default compiler and turbopack replaces the compiler as turbopack is a compiler as well
Tamaskan DogOP
do we need to configure something diffrent ?
for turbopack ..?
you only need to add the
--turbopack argument to your start up script@B33fb0n3 what nextjs version are you using? If you are using nextjs15 try the --turbo flag
Dwarf Hotot
Use --turbo
@B33fb0n3 huh?
next 14.X only had
--turbo and next 15 has both options (turbopack and turbo)@Tamaskan Dog solved?
Tamaskan DogOP
nope ..
i guess there's not of 'use clinet' client side comp, that cauisg it to slowdown the dev server ..
i guess there's not of 'use clinet' client side comp, that cauisg it to slowdown the dev server ..
@Tamaskan Dog ?
Tamaskan DogOP
adding turopack is throwing warning : saying turbopack isn't configured properly
@Tamaskan Dog adding turopack is throwing warning : saying turbopack isn't configured properly
you might want to share more error details, else we cant help you
Dwarf Hotot
Use turbo not turbopack