2

I had this issue when developing a project of Next JS 13 app stable version in VS Code. The longer I run my app in dev mode the longer it takes for save, for intellicode to loads suggestions, also for prettier and eslint to auto format.

Example case:

  1. I stay and edits many times in one page.tsx file, which means nextjswill compile many times as well.
  2. As time goes on, the slow loading of saving and formatting comes up.
  3. The slow loading comes up more clear especially after I move to another file
  4. In the end I tried to restart VSCode and run dev again.
  5. At beginning after restart everything goes fine, but as time goes on... back to point number 1.

This is very strange bug because only in this Next JS 13 app project that the lags happen. Meanwhile I also opened other project like React project and Next JS 13 pages project, these projects run just fine.

For now still not yet found the solution, already tried to add .next in tsconfig and disabling extension just as the github community suggested, but lag still occurs.

gidgud
  • 71
  • 1
  • 6

1 Answers1

2

I decided to experiment with Next.js 13.4 to see if it would be a good fit for my project. In a simple React Vite app, I had a basic form that worked perfectly fine. However, after recreating it in Next.js, the development mode became extremely slow. As you mentioned, even the compilation time for Prettier takes a significant amount of time. I have been unable to find a solution thus far (I tried some solutions like uninstalling some packages etc., but no luck).

The closest thing I found that relates to this issue is this GitHub thread without a solution: https://github.com/vercel/next.js/issues/48748

If you happen to discover a solution to this problem in the future, I would greatly appreciate it if you could share it here.

Hh Dreamer
  • 43
  • 6
  • After reading some suggestions from this thread: https://github.com/vercel/next.js/discussions/38477#discussioncomment-6148276 I try to uninstall ``prettier-plugin-tailwindcss`` package and luckily my project is working smoothly now – gidgud Jun 22 '23 at 07:15
  • 1
    Thanks, I tried that also, but no luck. I started again with the 13.4.7 with a clean project without any packages like prettier, it's a little better, but still when I spend much time in app development mode, it starts to slow down. I don't know, but I think I miss React Vite development. – Hh Dreamer Jun 29 '23 at 18:51