#Slooooow dev server

16 messages · Page 1 of 1 (latest)

topaz furnace
#

So I know the next server compiles 1 page at a time. And I THOUGHT that was to help mitigate slow startup times for larger projects. But that doesn't seem to be the case. We have a medium sized project (50 something api routes. 30 different UI routes. 40-50 custom components). And it's getting kind of painful to work with when you need to navigate around some. It's especially painful on auth routes when you have a couple redirects due to logouts or whatever. It can be up to 10s or more waiting on the browser to actually render something.

Is this just how Next dev works on larger projects, or have we done something to cause it to go slow?

summer sirenBOT
#

🔎 This post has been indexed in our web forum and will be seen by search engines so other users can find it outside Discord

🕵️ Your user profile is private by default and won't be visible to users outside Discord, if you want to be visible in the web forum you can add the "Public Profile" role in id:customize

✅ You can mark a message as the answer for your post with Right click -> Apps -> Mark Solution
(if you don't see the option, try refreshing Discord with Ctrl + R)

topaz furnace
#

ok well after digging around a bit. Seems this is just an issue with Next app router 😦

#

Hopefully they are addressing this with React 19 release?

sand crag
#

You can use turbo

#

To speed up development

topaz furnace
#

hmm, our app breaks when I try that. How much better is it with that?

topaz furnace
#

yeah, doesn't seem to like tailwind

obtuse vapor
#

same issue here tho never got any solutions. development speed mostly depends on machine. and using turbo will most likely break my application at some point

topaz furnace
#

Yeah I'm on a 7800 X3D. So not my machine 😦

fresh barn
#

You view the unsupported features of turbopack here may be something else you have going on in your app that breaks it

Turbopack is an incremental bundler optimized for JavaScript and TypeScript, written in Rust, and built into Next.js.

topaz furnace
#

yeah I looked through that and didn't see anything. Maybe the "postprocessor" error is a red herring.

fresh barn
#

Yeah, turbopack has had all tests passing for some time now for the dev server so it's stable to use in development as long as you aren't using any unsupported features.

Do you have a screenshot of the error you get when you try to enable turbopack?

#

It's worth looking into because it significantly increases the speed of the server, and the bigger the project the more noticable that improvement is.

topaz furnace
#
 ./node_modules/tailwindcss/lib/postcss-plugins/nesting/plugin.js:38:24
Module not found
  36 |             }
  37 |             if (typeof opts === "string") {
> 38 |                 return require(opts);
     |                        ^^^^^^^^^^^^^
  39 |             }
  40 |             if (Object.keys(opts).length <= 0) {
  41 |                 return _postcssnested.default;