pocketbase: Admin panel is not opening on Windows

While trying to open Admin panel at http://localhost:8090/_/ on Windows 11 I’m getting blank page and the following error in a browser console:

index.944ee0db.js:1 
        
Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of "text/plain". Strict MIME type checking is enforced for module scripts per HTML spec.

Browser: Microsoft Edge 103.0.1264.49

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 18 (9 by maintainers)

Commits related to this issue

Most upvoted comments

Indeed, in C:\Windows\System32\drivers\etc\hosts I have localhost section commented:

# localhost name resolution is handled within DNS itself.
#       127.0.0.1       localhost
#       ::1             localhost

Starting with --http="127.0.0.1:8090" did the trick and I’m able to see Admin panel now!

Thanks for testing. That’s unexpected, it shouldn’t take more than a couple of seconds max to load the ui. I’ll try to upgrade my Windows 10 vm to the version you are using and will test it again.

Adding mime.AddExtensionType(".js", "application/javascript") as @FeodorFitsner suggested before initializing the application would probably fix the issue without the need of go 1.19, but I want to avoid that because this a unintentional Windows registry misconfiguration, that they probably will patch with a future update (I’m actually surprised that the go team agreed to make an exception for this case in their code).

I’m getting the same issue in Windows 10 21H2 19044.1766 in Firefox 102.0.1 (64-bit).

Windows 11 Version 10.0.22000.739