love.js
love.js copied to clipboard
Window setup in love.load results in weird error "File main.lua does not exist on disk"
Hi,
I am pretty sure this is a hosting issue my end, but I'm writing to find out what produces the following console error message and under what circumstances?
File main.lua does not exist on disk.
I can't see it in the repo.
I can host locally on MAMP/Apache, but the error appears when I transfer my working files to my web server which is running Caddy. I need to figure out what is wrong so I can address it properly.
Thanks!
I have managed to set more a specific MIME type directive for .love files on my server, which gets the default nogame.love working ...but custom games are still not working.
I think I need to know exactly how the wasm might fail, so i can make sure i have everything in place.
The g file is fetched, so it seems to be some request after the fetch that is failing.
OK, managed to track it down. I was doing some love.window stuff in love.load rather than love.conf
That resulted in the "File main.lua does not exist on disk." error
Moving the window setup to love.conf has everything running OK.
So, I'd like to suggest better error messages for this scenario.
Sorry, I did not receive any notifications and failed to notice this issue. Debugging love.js is quite difficult and I agree with you that the error messages are not very helpful. love.js does seem to crash the browser in certain cases even when you use pcall. I will think about what we can do, but I cannot promise anything at this point. Ultimately we would have to rewrite love.js which without the minification takes up over 150,000 lines of code.
Can you please confirm that this error still occurs? I assume that the error should be fixed after the following commit: https://github.com/2dengine/love.js/commit/6b516ac1e6765db6e9b7b884a24fb1459d21f156