[Solved] Dirname undefined exporting HTML5 to zip

Very similar to the exporting to windows bug, but different export routine so I’m logged as a different bug. Create a basic game online - I’ve just created a default scene, default sprite, and single animation with single frame. Go to export as HTML5 zip file, click Export as a HTML5 game, yields: Error while exporting the game. Cannot read property ‘dirname’ of undefined.

What is “the exporting to windows bug”?
Have you tried defining the dirname? :smirk:

This is the existing bug: [Solved] Having issues exporting as a windows file?. I found it again by searching for ‘dirname’; this was the only other result.

“Have you tried defining the dirname?”

Where do you do that? I’ve looked through Preferences, Game Settings > Properties, Export (no settings…), the online help, the wiki…

From Chrome, this is the raw error:

rawError: TypeError: Cannot read property ‘dirname’ of undefined at AbstractFileSystemJS.dirNameFrom (https://editor.gdevelop-app.com/static/js/browser-app.8842a9d8.chunk.js:1:1914) at 10469 (https://editor.gdevelop-app.com/libGD.js:75:14085) at _emscripten_asm_const_iii (https://editor.gdevelop-app.com/libGD.js:75:21714) at Array.XB (https://editor.gdevelop-app.com/libGD.js:37:82334) at zM (https://editor.gdevelop-app.com/libGD.js:57:184543) at UY (https://editor.gdevelop-app.com/libGD.js:41:205594) at EY (https://editor.gdevelop-app.com/libGD.js:41:170478) at DY (https://editor.gdevelop-app.com/libGD.js:41:169607) at mp (https://editor.gdevelop-app.com/libGD.js:25:134781) at Module._emscripten_bind_Exporter_ExportWholePixiProject_3 (https://editor.gdevelop-app.com/libGD.js:75:450955) at Exporter.ExportWholePixiProject.Exporter.ExportWholePixiProject [as exportWholePixiProject] (https://editor.gdevelop-app.com/libGD.js:75:1020749) at Object.launchExport (https://editor.gdevelop-app.com/static/js/browser-app.8842a9d8.chunk.js:1:3847418) at https://editor.gdevelop-app.com/static/js/1.b9743d5d.chunk.js:1:802119
stack: “TypeError: Cannot read property ‘dirname’ of undefined↵ at AbstractFileSystemJS.dirNameFrom (https://editor.gdevelop-app.com/static/js/browser-app.8842a9d8.chunk.js:1:1914)↵ at 10469 (https://editor.gdevelop-app.com/libGD.js:75:14085)↵ at _emscripten_asm_const_iii (https://editor.gdevelop-app.com/libGD.js:75:21714)↵ at Array.XB (https://editor.gdevelop-app.com/libGD.js:37:82334)↵ at zM (https://editor.gdevelop-app.com/libGD.js:57:184543)↵ at UY (https://editor.gdevelop-app.com/libGD.js:41:205594)↵ at EY (https://editor.gdevelop-app.com/libGD.js:41:170478)↵ at DY (https://editor.gdevelop-app.com/libGD.js:41:169607)↵ at mp (https://editor.gdevelop-app.com/libGD.js:25:134781)↵ at Module._emscripten_bind_Exporter_ExportWholePixiProject_3 (https://editor.gdevelop-app.com/libGD.js:75:450955)↵ at Exporter.ExportWholePixiProject.Exporter.ExportWholePixiProject [as exportWholePixiProject] (https://editor.gdevelop-app.com/libGD.js:75:1020749)↵ at Object.launchExport (https://editor.gdevelop-app.com/static/js/browser-app.8842a9d8.chunk.js:1:3847418)↵ at https://editor.gdevelop-app.com/static/js/1.b9743d5d.chunk.js:1:802119
message: “Cannot read property ‘dirname’ of undefined”

You are in the Web editor, this web editor is still in WIP.
You cannot export a game.
Btw you can save your project (save as → Download a copy) for use it on GDevelop desktop app and do an HTML5 export.

1 Like

Perhaps, then, if you know it is the web editor and this functionality is not available, instead of having it present, and giving an esoteric error message, may I suggest it says “This functionality isn’t present yet.” - I don’t mean to be too awkward, but GDevelop prides itself on being an easy to use editor, and this aspect isn’t…

Here’s the warning:

It could be more complete, true.

1 Like

This is a bug, I’m looking into it.

This was a bug, this is fixed :slight_smile: Since a few versions, the web-app is able to export games just like the desktop version.
Make sure to refresh your cache if you try the updated web version.

1 Like