I’m running into a persistent issue with exporting my project in Godot 4.5 stable, both for HTML5 and Windows.
Problem:
When exporting to HTML5 and launching in a browser (local Python HTTP server or Itch.io), I get the following error:
Error: Couldn’t load project data at path “.”. Is the .pck file missing?
If you’ve renamed the executable, the associated .pck file should also be renamed to match the executable’s name (without the extension).
When exporting a Windows EXE with the PCK embedded, I encounter the same error when I try to launch my exe outside of project directory
What I’ve tried:
Verified all files are present and correctly named (index.html, MyGame.pck, MyGame.js, MyGame.wasm for HTML5). I checked in the index.html that the pck was called correctly.
I also tried with index.html, index.pck, index.wasm…
Tested on Itch.io with both “SharedArrayBuffer support” enabled and disabled; the error persists in both cases.
Tested HTML5 locally using python -m http.server. (same error)
Additional info:
I had to download my export template manually because godot gives me an “unable to connect to the mirror.” at the end of the classic download (I don’t know if it’s related).
I am not an English speaker, sorry if my explanations are not clear.
I have gotten similar errors in my own projects because I tried to load files using the Operating System’s address rather than Godot’s file system.
For example, loading from (“C://My-Username/…/…/Godot-Project/File_I_Want.txt”) rather than “res://…/…/File_I_Want.txt”.
It’s a little hard for me to verify that on the forum, but it’s something you can check on your end. I think it’s something like that, mainly because you mentioned the windows copy only works when it’s in the project directory.