HTML5 doesn't loading from server

Hello here!
I have the little game on defold, and my little server on Node.JS (express, digitalOcean)
Then i running server on localhost, all done good: the game is loading as well and i can play it.
When i trying loading game through server, i got next error:

dmloader.js:192 Uncaught Unexpected data size
dmloader.js:592 Uncaught TypeError: Module.ccall is not a function

Any ideas? I think it’s can be node.js, but anyway. How properly deliver the game?

Try asking this question on a node.js support forum too.

1 Like

@britzl, did you try this? In general, it should be able to make http-calls fine when running in the browser.

EDIT: Disregard this, I misunderstood the problem.

Okay, there is the problem:

On local machine, after build HTML5 i have files with WIndows-style line endings. and in achrive-files.json file-size recorded with windows line-engings.
After pushing github and deploying on my server, line ending become LF (unix) and file size reduced about ~20 bytes.

That all. When dmloaded.js check file size, its throw error
I See two solutions: find to build files with LF line endings or push line endings as is.

1 Like

If it’s a problem with line endings in Git then I’d recommend that you take a look at this article on how to deal with line endings.

1 Like