Compile time, each time more than 8 Seconds
Unanswered
Cape horse mackerel posted this in #help-forum
Cape horse mackerelOP
Nextjs compile time is slow, is that a common issue? or else can I reduce it?
26 Replies
Cape horse mackerelOP
super slow development
Cape lion
in the dev mode, it’s not unusual that it’s that slow
in production mode, it will be way faster
Cape horse mackerelOP
So I have to develop like that right?
Is there anything I can do to speed up the development?
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
Cape horse mackerelOP
ah ok
thanks
Cape lion
no problem
Cape horse mackerelOP
I assume you guys have been developing like this
Bengal
No, what are your specs? It shouldn't take that long. Check out turbo as someone mentioned above. What version are you on?
Cape horse mackerelOP
Where to check the specs?
Next.js v13.4.3
When I ran
npx next --version
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
For the Next.js version, I'd recommend upgrading to 14.2 (maybe 15 if you can) and trying turbopack
Cape horse mackerelOP
what kind of fiels I should be adding here?
I have a 16GB ram and i5 8Gen, this is not the case for my Laravel + React deveopment, I get pretty fast rendering.
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
Cape horse mackerelOP
This is not my project, I am just doing a react work.
Bengal
Or if you want upgrade to v15 immediately (current version) where turbo is supported normally for development
But v15 has breaking changes
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