📄 SKILL.md

← Vault

name: lovable-vps-502-debug

description: Debug 502/blank-screen errors on Lovable/TanStack Start apps deployed to VPS behind Cloudflare CDN

category: devops


Lovable/TanStack Start VPS — 502 / Tela Branca Debug

Sintomas

Ordem de debug

1. Transpilar com TS para confirmar se é parseável:

`bash

node -e "

const ts=require('typescript'),fs=require('fs');

const r=ts.transpileModule(fs.readFileSync('src/routes/index.tsx','utf8'),{compilerOptions:{jsx:ts.JsxEmit.React,target:ts.ScriptTarget.ESNext},fileName:'test.tsx',reportDiagnostics:true});

if(r.diagnostics?.length)r.diagnostics.forEach(d=>console.log(ts.flattenDiagnosticMessageText(d.messageText,' ')));

else console.log('TS: OK — problema é esbuild/Vite, não TS');

"

`

2. Contar divs manualmentegrep -n "

\| para ver se estão balanced

3. Simplificar JSX quando TS diz OK mas build falha:

- Substituir Shadcn por nativos

- Substituir