Next.js Discord

Discord Forum

Next apps run super slow in dev on m1 Air

Unanswered
Persian posted this in #help-forum
Open in Discord
PersianOP
✓ Ready in 1519ms
○ Compiling / ...
✓ Compiled / in 102.1s (36237 modules)

It's so painfuly slow to do anything

25 Replies

Southern rough shrimp
What command are you using to run the build
And provide us your package.json
@Persian ✓ Ready in 1519ms ○ Compiling / ... ✓ Compiled / in 102.1s (36237 modules) It's so painfuly slow to do anything
you can use nextjs 15 and the --turbopack flag to let your pages compile waaaay faster: npm run-script dev --turbopack
PersianOP
I am on a static export next app, version 14.2.16 and this result shared is for next dev
Rose-breasted Grosbeak
Maybe try docker
@Rose-breasted Grosbeak Maybe try docker
docker while developing? Docker in production, ok. But while developing?
Rose-breasted Grosbeak
why not?
spins up faster than turbopack
@Rose-breasted Grosbeak why not?
can you share what I need to do, to do that?
Rose-breasted Grosbeak
uhm, create a container, expose a port, and you're good to go?
I haven't used docker with nextjs (because I didn't need to) but it should be the same process
Rose-breasted Grosbeak
except for HMR, yeah
Asian black bear
This suggestion is really detrimental as IO can often become slower on certain machines when routing through Docker. Devcontainers are not used to speed things up, they have a different purpose. What OP is struggling with is just that they are not using Turbopack and should explore using that instead.
Rose-breasted Grosbeak
is that available on v14?
Asian black bear
Yes.
Rose-breasted Grosbeak
ow great then
PersianOP
yeah I'll def try using turbopack, thanks for the discussion
non-turbopack shouldnt take 102 seconds to compile
@PersianHave you considered updating to a later version? Maybe nextjs v15
PersianOP
tbh my app is pretty heavy on packages, not ui but web3 related. I'll consider upgrading if other solutions don't workout
Southern rough shrimp
make sure to mark the solution
PersianOP
sure will do, thanks