Next.js Discord

Discord Forum

Compile time, each time more than 8 Seconds

Unanswered
Cape horse mackerel posted this in #help-forum
Open in Discord
Avatar
Cape horse mackerelOP
Nextjs compile time is slow, is that a common issue? or else can I reduce it?
Image

26 Replies

Avatar
Cape horse mackerelOP
super slow development
Image
Avatar
Cape lion
in the dev mode, it’s not unusual that it’s that slow
in production mode, it will be way faster
Avatar
Cape horse mackerelOP
So I have to develop like that right?
Is there anything I can do to speed up the development?
Avatar
Cape lion
you could use turbo: https://nextjs.org/docs/app/api-reference/next-config-js/turbo but development still will be slower then in production, as the files will be compiled on the fly
Avatar
Cape horse mackerelOP
ah ok
thanks
Avatar
Cape lion
no problem
Avatar
Cape horse mackerelOP
I assume you guys have been developing like this
Image
Avatar
Bengal
No, what are your specs? It shouldn't take that long. Check out turbo as someone mentioned above. What version are you on?
Avatar
Cape horse mackerelOP
Where to check the specs?
Next.js v13.4.3
When I ran npx next --version
Avatar
Bengal
Your PC/Mac specs, if you're running on a not-that-good PC you can't expect much.

For the Next.js version, I'd recommend upgrading to 14.2 (maybe 15 if you can) and trying turbopack
Avatar
Cape horse mackerelOP
what kind of fiels I should be adding here?
Image
I have a 16GB ram and i5 8Gen, this is not the case for my Laravel + React deveopment, I get pretty fast rendering.
Avatar
Bengal
If you upgrade to 14.2 you can alter your npm run dev in package.json to be next dev --turbo
Next.js version 14 shouldn't have any breaking changes so the upgrade should be smooth
Avatar
Cape horse mackerelOP
This is not my project, I am just doing a react work.
Avatar
Bengal
Or if you want upgrade to v15 immediately (current version) where turbo is supported normally for development
But v15 has breaking changes
Avatar
Cape horse mackerelOP
alright then I have to talk to the actual dev about this.
So at leastt I got to know this isn't normal.
Thanks @Bengal