Next.js Discord

Discord Forum

After upgrading to Next 14 inside of a Turbo repo, it takes 15 minutes to compile my / route

Answered
Bombay-duck posted this in #help-forum
Open in Discord
Bombay-duckOP
I am running an m2 macbook pro. After upgrading my Next 13 project which had no compile time issues to Next 14, it now hangs on Compiling / for over 15 minutes before completing. I've tried clearing out my node_modules and .next folders with no success. Has anyone run into this issue? I am uses the pages directory.
Answered by Bombay-duck
I found one possible cause that helped resolve the issue in my case: tailwind was looking through too many folders and suddenly in nuxt 14 my compile times were horrendous. I'm not sure why tailwind is so much slower in 14 than in 13 but I fixed it by doing this:

Switch this:
  content: ["../frontend/**/*.{js,ts,jsx,tsx}"],


To this:
  content: [
    "./app/**/*.{js,ts,jsx,tsx,mdx}",
    "./pages/**/*.{js,ts,jsx,tsx,mdx}",
    "./components/**/*.{js,ts,jsx,tsx,mdx}",
  ],
View full answer

3 Replies

Toyger
did you try it without turbopack? it still in beta and have issues https://github.com/vercel/next.js/issues/48748
Bombay-duckOP
Hey thanks for responding! I don't believe that I am using Turbopack, I am not using the --turbo flag when invoking next dev. I am using Turbo Repo however.
Bombay-duckOP
I found one possible cause that helped resolve the issue in my case: tailwind was looking through too many folders and suddenly in nuxt 14 my compile times were horrendous. I'm not sure why tailwind is so much slower in 14 than in 13 but I fixed it by doing this:

Switch this:
  content: ["../frontend/**/*.{js,ts,jsx,tsx}"],


To this:
  content: [
    "./app/**/*.{js,ts,jsx,tsx,mdx}",
    "./pages/**/*.{js,ts,jsx,tsx,mdx}",
    "./components/**/*.{js,ts,jsx,tsx,mdx}",
  ],
Answer