Godot Version
4.5
Question
When I export my 2D game to HTML it says this error:
[Prepare Templates]: Could not open template for export: “/home/pi/.local/share/godot/export_templates/4.5.stable/web_nothreads_debug.zip”
4.5
When I export my 2D game to HTML it says this error:
[Prepare Templates]: Could not open template for export: “/home/pi/.local/share/godot/export_templates/4.5.stable/web_nothreads_debug.zip”
Did you download the export templates?
When I try downloading it, it says: Can't open the export templates file.
Checkout this thread for alternate solutions: Unable to download export template - #21 by sebashtioon
It doesn’t work because I’m using Ubuntu and it says curl not found install it using snap apt curl install
I’d recommend you either stop using Ubuntu or learn more about how to use it. Installing packages on the command line is a basic part of using linux. Ubuntu is really easy to use for a linux distro, but it’s more complicated than using Windows or a Mac. The error message was telling you what to type:
snap apt curl install
You also didn’t mention you were using Ubuntu. I would have linked you to the post higher up in the thread where there’s a linux solution using wget:
wget github.com/godotengine/godot/releases/download/4.5-stable/Godot_v4.5-stable_export_templates.tpz
That ended up not working so I installed the Godot 4.5 from flathub and it exports but now when I open the index.html it says Failed to fetch after loading for a couple seconds, and when I upload it to Github pages or itch.io is doesn’t load.
Are you using GDScript or C#?
GDScript
The index.html file won’t work on it’s own, it needs to be hosted by a server, Godot provides an easy to use server if the export is runnable with the “Remote Deploy” button next to play.
What are you uploading to itch and github pages?
On itch.io I’m uploading the index.html and setting it as playable in browser. But on Github I’m uploading all of the exported html files e.g. index.audio.position.worklet.js, index.audio.worklet.js, index.html, index.js, index.pck, index.png and index.wasm and enabling github pages.
Edit: In the export settings I also recently changed Display to Standalone, Orientation to Any and toggled off the export icon and enabled For mobile and For desktop
Itch will need a zip file with all the exported files included, specifically without any sub-folders.
You can remove sub-folder paths by using the “junk” paths option -j
zip itch_export.zip -j build_folder/*
Not too sure on github pages, I’m sure it may require specific paths, haven’t tried Godot on the platform myself.
Thank you so much that worked! I zipped the file and it’s able to be played on itch.io
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.