Mscorlib exception when building for HTML5

Whenever I build for HTML5 from Frontend, I get a “build failed” with this exception:

Program.Main: ERROR: Exception in mscorlib: Could not find file ‘D:\Unreal Projects\UnrealEngine\Engine\Binaries\HTML5\UE4Game.js’.

I guess it failed to produce the UE4Game.js file, which is why it’s throwing this exception at me. It’s also preceded by this line:
CommandUtils.Run: Run: C:\Windows\system32\cmd.exe /c python “C:\Program Files\Emscripten\emscripten\1.21.0\tools\” “C:\Users\Smike\Documents\Unreal Projects\MyProject\Binaries\HTML5\” --preload . --js-output=“C:\Users\Smike\Documents\Unreal Projects\MyProject\Binaries\HTML5\”

Could it be a problem with Emscripten?

*Log attached.

Thanks for the help. I found out what the problem was. It turns out the solution to my problem was simply to build my game project in Visual Studio with the “Development” setup for the Windows platform. Then I could package my game for HTML5 without errors!

You can compile UE4Game.js manually from Visual Studio by

  1. Choosing HTML5 in the “Solutions Platforms”
  2. Choosing Development in the “Solutions Configurations”


Actually, it looks like you need to make sure you have "Do you with to build " checked in the UnrealFrontend before launching. That solved the issue for me.

Worked for me with UE 4.6 but not 4.5. What do you have to build exactly?