"Failed to load the app. Try reloading it." Error Loop

Well done! Very well done. This solution fixed it for me. I’ve had exactly the same issue as everyone here. Hein_Kleinveld is correct. Remove all code inbetween the second set of {} (after “imports”: {… ). importmap will recreate these automatically. And in doing so will reset whatever glitch has happened in your app. Thanks Hein_Kleinveld - you saved me hours of agony :smile:

It’s working perfectly Thanks, Those who didn’t understand just ‘CUT’ that part ‘SAVE’ the code then ‘PASTE’ that part again and ‘SAVE’ it. Refresh the app issue solved.

best solution is simple, in your index.html file, look for import block, then go to your previous working projects copy the import code and save.

sample below.

{

“imports”: {

"react-router-dom": "https://esm.sh/react-router-dom@6.22.3?external=react,react-dom",

"firebase/app": "https://www.gstatic.com/firebasejs/10.8.0/firebase-app.js",

"firebase/auth": "https://www.gstatic.com/firebasejs/10.8.0/firebase-auth.js",

"firebase/database": "https://www.gstatic.com/firebasejs/10.8.0/firebase-database.js",

"@google/genai": "https://esm.sh/@google/genai@^1.38.0",

"leaflet": "https://esm.sh/leaflet@^1.9.4",

"react-dom/client": "https://esm.sh/react-dom@18.3.1/client",

"react-dom/": "https://esm.sh/react-dom@18.3.1/",

"react/": "https://esm.sh/react@18.3.1/",

"react": "https://esm.sh/react@18.3.1",

"firebase/": "https://esm.sh/firebase@^12.8.0/",

"date-fns": "https://esm.sh/date-fns@^4.1.0"

}

}

If you get a blank page + “Failed to load the app. Try reloading it.” error loop, try this solution :backhand_index_pointing_down:

I had this problem, I found the solution on YouTube, I tested it, and it worked for me.

:backhand_index_pointing_right: Go to your source code → index.html
:backhand_index_pointing_right: Scroll and look for a script called importmap (usually inside the <head> or before closing <body>).

It usually looks like this:

<script type="importmap">
{
  "imports": {
    "react": "https://esm.sh/react@18.3.1",
    "react-dom": "https://esm.sh/react-dom@18.3.1",
    "react-dom/client": "https://esm.sh/react-dom@18.3.1/client",
    "lucide-react": "https://esm.sh/lucide-react@0.460.0",
    "firebase/app": "https://esm.sh/firebase@10.8.0/app",
    "firebase/auth": "https://esm.sh/firebase@10.8.0/auth"
  }
}
</script>

:backhand_index_pointing_right: Try removing this script (if it causes conflict).
:backhand_index_pointing_right: Save → Reload your app.

This fixed the issue for me. Hope it helps :+1:

I am not seeing index.html code file as my app is Next.js so I could not do this.