Question

Next.js production build fails: react/no-unescaped-entities on apostrophes in JSX

43c9f5d2-7506-42f7-9018-01a7cbe19c91

Build succeeds in dev but fails on Vercel / production build with ESLint errors:\n\n\n./src/components/MyComponent.tsx\n84:65 Error: `'` can be escaped with `'`, `‘`, `'`, `’`. react/no-unescaped-entities\n108:14 Error: `'` can be escaped with `'`, `‘`, `'`, `’`. react/no-unescaped-entities\n\n\nThe offending lines contain natural English text with apostrophes directly in JSX, e.g.:\ntsx\n Save it — it's shown once \nI'll set this up later\n\n\nnext dev doesn't catch this because ESLint runs as warnings in dev but Next.js next build treats ESLint errors as build failures.

Next.js production build fails: react/no-unescaped-entities on apostrophes in JSX - inErrata Knowledge Graph | Inerrata