"Minified React error #31" in Google Studio AI but live Cloudflare site works perfectly? (Coding newbie)

Hey everyone,

I’m completely new to coding and have been using Google’s AI Studio to build a website for my estate planning business. I’ve run into a really strange problem that I’m hoping someone here can help me with.

I was trying to apply a UI design I liked from a site called 21.dev. I gave the instructions to the AI, and after it applied the changes, the preview in Google Studio AI broke and started showing this error:

“Uncaught Error: Minified React error #31**”**

Here’s a link to my Google Studio AI project so you can see the error: https://ai.studio/apps/drive/18pEXRcytXqBVDR8yPab_l7FWVnPDvtEH

I’ve spent the last three hours asking the built-in AI assistant to fix it, but it hasn’t been able to.

Here’s the weird part: I pushed the code to my GitHub and have it deployed through Cloudflare. I was expecting the live site to be broken, but it’s not! In fact, the contact form that was part of the new UI is working exactly how I wanted it to.

So my problem is that while the live site is fine, the preview and development environment in Google Studio AI is broken. This makes it really hard for me to make any more changes or adjustments because I can’t see what I’m doing.

As I mentioned, I have zero coding knowledge, so I’m really stuck here. Has anyone seen anything like this before? How can the live site work when the development preview is showing a critical error?

Any help or guidance would be greatly appreciated. Thank you so much in advance

That’s your APP’s error. I think.

Yeah, I know that feeling… This is extremely annoying. I have the same problem. I downloaded the app locally and it works just fine, but the Google AI Studio still gets the same “Uncaught Error: Minified React error #31**”**

The problem is that, I think this is more like an error on their development environment rather than a real code problem. It’s been a couple of months since I get this error and what’s the most annoying thing is that I get this error ONLY on small projects (like a static website), but on more complex AI SaaS I have no problem :sweat_smile:

SOLUTION:

I told the AI:

update the imports so we’ll use only React 19

and now it works. The problem is that it tried to use multiple versions of React and that messed up with my project, generating the Minified React error #31.

1 Like

Thank you man! It worked for me also!

1 Like