Error: Uncaught ReferenceError: React is not defined

its always giving me this error, using Claude Sonnet. it happens always on preview. I must always ask it to fix it so it can preview it successfully which adds unnecessary additional token usage. is there a way to fix this?

Same problem for me…

I would say its enough to specify your initial prompt better to get better results.
I also dont have this error very often when using Gemini 2.0 Flash, which is by the way free.