Invisible Characters (BOM)

Bug Description
When using Cursor’s AI to create or edit TypeScript files, invisible characters (BOM/Unicode markers) are being added to the files. This causes Vite/esbuild to fail with “Unexpected ‘�’” errors.

Steps to Reproduce

  1. Create or edit a TypeScript file using Cursor’s AI assistance
  2. Try to run the development server (npm run dev)
  3. Build fails with “Unexpected ‘�’” error
  4. Even after fixing files in VS Code, the corruption returns when using Cursor’s AI to edit the files

Error Messages
Error: Failed to scan for dependencies from entries:
[File path]

X [ERROR] Unexpected “�”

src/pages/blog-generators/GardeningBlogGenerator.tsx:1:0:
  1 │ ��// Gardening Blog Generator
    ╵ ~

Impact

  • Development server cannot start
  • Files need to be constantly cleaned of invisible characters
  • Switching between editors creates inconsistency in development
  • AI assistance becomes counterproductive as it reintroduces the corruption

Environment

  • OS: Windows 10
  • Cursor Version: x64-0.47.8
  • Project Type: React/TypeScript with Vite
  • Build Tools: Vite, esbuild

Additional Context

  • This happens consistently with TypeScript files
  • The issue persists even after cleaning files in other editors
  • The invisible characters are reintroduced when using Cursor’s AI to edit files

I’m not a coder, so I’m using no-code (AI-Assistance) to build my project. This ate up several credits (cost money) before I realized it was a bug.

I take it response is slow? Or maybe this Bug Report section isn’t checked often (only 3 views at this point)?

Is Cursor active or a dead platform with no support? I hope that’s not the case because it’s rather user friendly for non-coding people to use when it actually works (and doesn’t have bugs).

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.