Cursor IDE Freezes When Saving Next.js Project with Prettier

Description:
I have a Next.js project with the following relevant dependencies (among others) that appear related to my Prettier/lint setup:

  • eslint: ^9
  • eslint-config-next: 15.1.6
  • eslint-config-prettier: ^4.3.0
  • eslint-plugin-prettier: 3.0.1
  • prettier: ^2.8.8
  • prettier-plugin-tailwindcss: ^0.3.0

Every time I save a file, Cursor IDE’s lint process runs and then the editor freezes or hangs with the message “Running lint editor”. I have to reboot the IDE, but the issue keeps happening. I’ve tried:

  • Node version 20.0.0 (and other versions)
  • Updating to the latest Prettier versions

No combination has solved the freezing issue.

Prettier Configuration (.prettierrc):

json

{
  "bracketSpacing": true,
  "endOfLine": "lf",
  "printWidth": 80,
  "semi": true,
  "singleQuote": true,
  "tabWidth": 2,
  "trailingComma": "all",
  "plugins": ["prettier-plugin-tailwindcss"]
}

Steps to Reproduce:

  1. Open the Next.js project in Cursor IDE.
  2. Make any changes to a file.
  3. Save the file.
  4. The IDE shows “Running lint editor” and becomes unresponsive.

Expected Behavior:
The IDE should format the file (via Prettier) and complete linting without freezing.

Additional Context:

  • Next.js: 15.1.6
  • React: 19.0.0
  • React DOM: 19.0.0
  • TypeScript: ^5
  • Node: 20.0.0

Would appreciate any guidance or workaround!

1 Like

Hey, if you try to run Prettier manually, not triggering on save, does that still freeze up?

Hi Dan!
Thanks for replying. When I run it manually it does freeze. My work around was exactly that. I run it once I have made a certain amount of changes. But it’s so weird. Do you have any insights?

Looks like others are experiencing this too - found this thread Prettier code format take a long time to format · Issue #2999 · prettier/prettier-vscode · GitHub

It’s likely an issue with the Prettier plugin itself rather than Cursor. Your workaround of running it manually after a bunch of changes is probably the best approach for now!

You could try removing the Tailwind plugin temporarily to see if that helps, but based on the GitHub thread it might not make a difference

Yes its still freeze

Same issue, where it’s freezing while saving? Does the whole editor become totally unresponsive?

Not the whole editor, but cursor remains unresponsive and can’t collapse or expand the code in that time being