Next.js Discord

Discord Forum

Extremely slow compile times on windows

Answered
Asian black bear posted this in #help-forum
Open in Discord
Asian black bearOP
As you can see its taking 165+ seconds to compile on my windows machine,
whilst with my M1 Pro its taking 12s or less.

in my pc I have an i5 11600KF and 32gb ram,

Surely something else is the reason for these extremely slow compile times
Answered by B33fb0n3
you can add the --turbopack flag to your app to use the turbo compiler. Like that you should get waaaay better compile times
View full answer

13 Replies

Are you running this on an HDD instead of an SSD?
@chisto Are you running this on an HDD instead of an SSD?
Asian black bearOP
this is on an SSD
@B33fb0n3 r u using app router or pages router?
Asian black bearOP
just pages, heres my structure
you can add the --turbopack flag to your app to use the turbo compiler. Like that you should get waaaay better compile times
Answer
@Asian black bear you are using the app router (if you get asked in the future)
like this
yes like this:
"dev": "next dev --turbopack",
Asian black bearOP
ah wow yes 7s now thats more like it
thank you
happy to help