# HTML5 Packaging failed. emcc: error: The temporary directory \`error\_temp\_dir\_not\_found\`

**URL:** <https://forums.unrealengine.com/t/html5-packaging-failed-emcc-error-the-temporary-directory-error-temp-dir-not-found/227246>\
**Category:** Platform & Builds\
**Tags:** html, unreal-engine\
**Created:** [April 30, 2021, 2:49pm UTC](https://forums.unrealengine.com/t/html5-packaging-failed-emcc-error-the-temporary-directory-error-temp-dir-not-found/227246 "2021-04-30T14:49:42Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![MINEZATOR](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@MINEZATOR](https://forums.unrealengine.com/u/MINEZATOR)\
**Post date:** [April 30, 2021, 2:49pm UTC](https://forums.unrealengine.com/t/html5-packaging-failed-emcc-error-the-temporary-directory-error-temp-dir-not-found/227246/1 "2021-04-30T14:49:42Z")

</div>

Hello everyone !

I really would like to try HTML5 on unreal but its instalation is very hard. After many hours of problems, I can finaly try a packaging but unfortunately it doesn’t work. An error emcc: error: The temporary directory `error_temp_dir_not_found` appears for the 511 actions to build :

[2021.04.30-08.25.36:812][240]UATHelper: Packaging (HTML5): Building 511 actions with 12 processes…  
[2021.04.30-08.25.37:827][361]UATHelper: Packaging (HTML5): [1/511] LightPropagationVolumeRuntimeModule.cpp  
[2021.04.30-08.25.37:828][361]UATHelper: Packaging (HTML5): emcc: error: The temporary directory `error_temp_dir_not_found` does not exist! Please make sure that the path is correct.  
[2021.04.30-08.25.37:828][361]PackagingResults: Error: The temporary directory `error_temp_dir_not_found` does not exist! Please make sure that the path is correct.  
[2021.04.30-08.25.37:833][362]UATHelper: Packaging (HTML5): [2/511] Module.Paper2D.cpp  
[2021.04.30-08.25.37:833][362]UATHelper: Packaging (HTML5): emcc: error: The temporary directory `error_temp_dir_not_found` does not exist! Please make sure that the path is correct.  
[2021.04.30-08.25.37:833][362]UATHelper: Packaging (HTML5): [3/511] Module.ImageWrapper.gen.cpp  
[2021.04.30-08.25.37:833][362]UATHelper: Packaging (HTML5): emcc: error: The temporary directory `error_temp_dir_not_found` does not exist! Please make sure that the path is correct.  
[2021.04.30-08.25.37:833][362]PackagingResults: Error: The temporary directory `error_temp_dir_not_found` does not exist! Please make sure that the path is correct.  
[2021.04.30-08.25.37:833][362]PackagingResults: Error: The temporary directory `error_temp_dir_not_found` does not exist! Please make sure that the path is correct.  
[2021.04.30-08.25.37:837][362]UATHelper: Packaging (HTML5): [4/511] LightPropagationVolumeRuntime.init.gen.cpp  
[2021.04.30-08.25.37:837][362]UATHelper: Packaging (HTML5): emcc: error: The temporary directory `error_temp_dir_not_found` does not exist! Please make sure that the path is correct.  
[2021.04.30-08.25.37:837][362]UATHelper: Packaging (HTML5): [5/511] AISupportModule.cpp  
[2021.04.30-08.25.37:837][362]UATHelper: Packaging (HTML5): emcc: error: The temporary directory `error_temp_dir_not_found` does not exist! Please make sure that the path is correct.  
[2021.04.30-08.25.37:837][362]UATHelper: Packaging (HTML5): [6/511] Module.Paper2D.gen.2\_of\_2.cpp  
[2021.04.30-08.25.37:837][362]UATHelper: Packaging (HTML5): emcc: error: The temporary directory `error_temp_dir_not_found` does not exist! Please make sure that the path is correct.  
[2021.04.30-08.25.37:837][362]PackagingResults: Error: The temporary directory `error_temp_dir_not_found` does not exist! Please make sure that the path is correct.  
[2021.04.30-08.25.37:837][362]PackagingResults: Error: The temporary directory `error_temp_dir_not_found` does not exist! Please make sure that the path is correct.  
[2021.04.30-08.25.37:837][362]PackagingResults: Error: The temporary directory `error_temp_dir_not_found` does not exist! Please make sure that the path is correct.  
[2021.04.30-08.25.37:856][364]UATHelper: Packaging (HTML5): [7/511] Module.Paper2D.gen.1\_of\_2.cpp  
[2021.04.30-08.25.37:856][364]UATHelper: Packaging (HTML5): emcc: error: The temporary directory `error_temp_dir_not_found` does not exist! Please make sure that the path is correct.  
[2021.04.30-08.25.37:857][364]UATHelper: Packaging (HTML5): [8/511] LightPropagationVolumeBlendable.gen.cpp  
[2021.04.30-08.25.37:857][364]UATHelper: Packaging (HTML5): emcc: error: The temporary directory `error_temp_dir_not_found` does not exist! Please make sure that the path is correct.  
[2021.04.30-08.25.37:857][364]UATHelper: Packaging (HTML5): [9/511] Module.AnimationSharing.cpp  
[2021.04.30-08.25.37:857][364]UATHelper: Packaging (HTML5): emcc: error: The temporary directory `error_temp_dir_not_found` does not exist! Please make sure that the path is correct.

Someone can help me ? What is The temporary directory ? what is it for? how to correct its path? thanks in advance, I apologize for my bad english

---

<div class="post-metadata">

**Author:** ![warvstar](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@warvstar](https://forums.unrealengine.com/u/warvstar)\
**Post date:** [April 30, 2021, 4:03pm UTC](https://forums.unrealengine.com/t/html5-packaging-failed-emcc-error-the-temporary-directory-error-temp-dir-not-found/227246/2 "2021-04-30T16:03:19Z")

</div>

It looks like you have not setup the toolchain properly. What version of the engine are you using? What documentation are you following?

---

<div class="post-metadata">

**Author:** ![MINEZATOR](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@MINEZATOR](https://forums.unrealengine.com/u/MINEZATOR)\
**Post date:** [April 30, 2021, 4:31pm UTC](https://forums.unrealengine.com/t/html5-packaging-failed-emcc-error-the-temporary-directory-error-temp-dir-not-found/227246/3 "2021-04-30T16:31:49Z")

</div>

this one : [Documentation/README.0.building.UE4.Editor.md at master · UnrealEngineHTML5/Documentation · GitHub](https://github.com/UnrealEngineHTML5/Documentation/blob/master/Platforms/HTML5/HowTo/README.0.building.UE4.Editor.md)

I managed to work around this error by creating a folder tmp at this location : ue4-4.24.3-html5\Engine\Platforms\HTML5\Build\emsdk\emsdk-1.39.18\tmp But now, I have other problems

Building UE4Game…  
[Adaptive unity build] Excluded from SlateCore unity file: CoreStyle.cpp  
[Adaptive unity build] Excluded from ImageWrapper unity file: PngImageWrapper.cpp  
[Adaptive unity build] Excluded from Renderer unity file: SystemTextures.cpp  
Building 3 actions with 12 processes…  
[1/3] Module.Sockets.cpp  
In file included from D:\ProjetsUe4\ue4-4.24.3-html5\Engine\Intermediate\Build\HTML5\UE4\Development\Sockets\Module.Sockets.cpp:8:  
D:/ProjetsUe4/ue4-4.24.3-html5/Engine/Source/Runtime/Sockets/Private/BSDSockets/SocketSubsystemBSD.cpp(325,7): error: duplicate case value ‘2’  
case TRY\_AGAIN: return SE\_TRY\_AGAIN;  
^  
D:\ProjetsUe4\ue4-4.24.3-html5\Engine\Platforms\HTML5\Build\emsdk\emsdk-1.39.18\upstream\emscripten\system\include\libc\netdb.h(123,24): note: expanded from macro ‘TRY\_AGAIN’  
#define TRY\_AGAIN 2  
^  
D:/ProjetsUe4/ue4-4.24.3-html5/Engine/Source/Runtime/Sockets/Private/BSDSockets/SocketSubsystemBSD.cpp(274,7): note: previous case defined here  
case EACCES: return SE\_EACCES;  
^  
D:\ProjetsUe4\ue4-4.24.3-html5\Engine\Platforms\HTML5\Build\emsdk\emsdk-1.39.18\upstream\emscripten\system\lib\libc\musl\arch\emscripten\bits/errno.h(15,28): note: expanded from macro ‘EACCES’  
#define EACCES \_\_WASI\_ERRNO\_ACCES  
^  
D:\ProjetsUe4\ue4-4.24.3-html5\Engine\Platforms\HTML5\Build\emsdk\emsdk-1.39.18\upstream\emscripten\system\include\wasi/api.h(122,28): note: expanded from macro ‘**WASI\_ERRNO\_ACCES’  
 #define WASI\_ERRNO\_ACCES (UINT16\_C(2))  
^  
In file included from D:\ProjetsUe4\ue4-4.24.3-html5\Engine\Intermediate\Build\HTML5\UE4\Development\Sockets\Module.Sockets.cpp:8:  
D:/ProjetsUe4/ue4-4.24.3-html5/Engine/Source/Runtime/Sockets/Private/BSDSockets/SocketSubsystemBSD.cpp(326,7): error: duplicate case value ‘3’  
case NO\_RECOVERY: return SE\_NO\_RECOVERY;  
^  
D:\ProjetsUe4\ue4-4.24.3-html5\Engine\Platforms\HTML5\Build\emsdk\emsdk-1.39.18\upstream\emscripten\system\include\libc\netdb.h(124,24): note: expanded from macro ‘NO\_RECOVERY’  
 #define NO\_RECOVERY 3  
^  
D:/ProjetsUe4/ue4-4.24.3-html5/Engine/Source/Runtime/Sockets/Private/BSDSockets/SocketSubsystemBSD.cpp(291,7): note: previous case defined here  
case EADDRINUSE: return SE\_EADDRINUSE;  
^  
D:\ProjetsUe4\ue4-4.24.3-html5\Engine\Platforms\HTML5\Build\emsdk\emsdk-1.39.18\upstream\emscripten\system\lib\libc\musl\arch\emscripten\bits/errno.h(57,28): note: expanded from macro ‘EADDRINUSE’  
 #define EADDRINUSE WASI\_ERRNO\_ADDRINUSE  
^  
D:\ProjetsUe4\ue4-4.24.3-html5\Engine\Platforms\HTML5\Build\emsdk\emsdk-1.39.18\upstream\emscripten\system\include\wasi/api.h(127,32): note: expanded from macro 'WASI\_ERRNO\_ADDRINUSE’  
 #define WASI\_ERRNO\_ADDRINUSE (UINT16\_C(3))  
^  
2 errors generated.  
emcc: error: 'D:/ProjetsUe4/ue4-4.24.3-html5/Engine/Platforms/HTML5/Build/emsdk/emsdk-1.39.18/upstream/bin\clang++.exe -target wasm32-unknown-emscripten -D\_\_EMSCRIPTEN\_major=1 -D\_\_EMSCRIPTEN\_minor=39 -D\_\_EMSCRIPTEN\_tiny=18 -D\_LIBCPP\_ABI\_VERSION=2 -Dunix -D\_\_unix -D\_\_unix -Werror=implicit-function-declaration -Xclang -nostdsysteminc -Xclang -isystemD:\ProjetsUe4\ue4-4.24.3-html5\Engine\Platforms\HTML5\Build\emsdk\emsdk-1.39.18\upstream\emscripten\system\include\libcxx -Xclang -isystemD:\ProjetsUe4\ue4-4.24.3-html5\Engine\Platforms\HTML5\Build\emsdk\emsdk-1.39.18\upstream\emscripten\system\lib\libcxxabi\include -Xclang -isystemD:\ProjetsUe4\ue4-4.24.3-html5\Engine\Platforms\HTML5\Build\emsdk\emsdk-1.39.18\upstream\emscripten\system\lib\libunwind\include -Xclang -isystemD:\ProjetsUe4\ue4-4.24.3-html5\Engine\Platforms\HTML5\Build\emsdk\emsdk-1.39.18\upstream\emscripten\system\include\compat -Xclang -isystemD:\ProjetsUe4\ue4-4.24.3-html5\Engine\Platforms\HTML5\Build\emsdk\emsdk-1.39.18\upstream\emscripten\system\include -Xclang -isystemD:\ProjetsUe4\ue4-4.24.3-html5\Engine\Platforms\HTML5\Build\emsdk\emsdk-1.39.18\upstream\emscripten\system\include\libc -Xclang -isystemD:\ProjetsUe4\ue4-4.24.3-html5\Engine\Platforms\HTML5\Build\emsdk\emsdk-1.39.18\upstream\emscripten\system\lib\libc\musl\arch\emscripten -Xclang -isystemD:\ProjetsUe4\ue4-4.24.3-html5\Engine\Platforms\HTML5\Build\emsdk\emsdk-1.39.18\upstream\emscripten\system\local\include -Xclang -isystemD:\ProjetsUe4\ue4-4.24.3-html5\Engine\Platforms\HTML5\Build\emsdk\emsdk-1.39.18\upstream\emscripten\system\include\SSE -Xclang -isystemD:\ProjetsUe4\ue4-4.24.3-html5\Engine\Platforms\HTML5\Build\emsdk\emsdk-1.39.18\upstream\emscripten\cache\wasm\include -DEMSCRIPTEN -fignore-exceptions -D\_\_EMSCRIPTEN\_PTHREADS**=1 -fdiagnostics-format=msvc -fno-exceptions -Wdelete-non-virtual-dtor -Wno-switch -Wno-tautological-constant-out-of-range-compare -Wno-tautological-compare -Wno-tautological-undefined-compare -Wno-inconsistent-missing-override -Wno-undefined-var-template -Wno-invalid-offsetof -Wno-gnu-string-literal-operator-template -Wno-final-dtor-non-final-class -Wno-implicit-int-float-conversion -Wshadow -Wundef -O2 -DEXPERIMENTAL\_OPENGL\_RHITHREAD=1 -I. -IRuntime\Sockets\Private -I…\Platforms\HTML5\Source\Runtime\Sockets\Private -IRuntime -IRuntime\TraceLog\Public -IRuntime\Core\Public -I…\Platforms\HTML5\Source\Runtime -I…\Platforms\HTML5\Source\Runtime\Core\Public -IThirdParty -I…\Platforms\HTML5\Source\ThirdParty\zlib\v1.2.8\include -IRuntime\Sockets\Public -include D:\ProjetsUe4\ue4-4.24.3-html5\Engine\Intermediate\Build\HTML5\UE4\Development\Sockets\Definitions.h -c -std=c++14 -MD -MFD:/ProjetsUe4/ue4-4.24.3-html5/Engine/Intermediate/Build/HTML5/UE4/Development/Sockets/Module.Sockets.cpp.d -pthread -pthread D:\ProjetsUe4\ue4-4.24.3-html5\Engine\Intermediate\Build\HTML5\UE4\Development\Sockets\Module.Sockets.cpp -Xclang -isystemD:\ProjetsUe4\ue4-4.24.3-html5\Engine\Platforms\HTML5\Build\emsdk\emsdk-1.39.18\upstream\emscripten\system\include\SDL -c -o D:\ProjetsUe4\ue4-4.24.3-html5\Engine\Intermediate\Build\HTML5\UE4\Development\Sockets\Module.Sockets.cpp.o -mllvm -combiner-global-alias-analysis=false -mllvm -enable-emscripten-sjlj -mllvm -disable-lsr’ failed (1)  
Took 4,5622013s to run UnrealBuildTool.exe, ExitCode=5  
UnrealBuildTool failed. See log for more details. (D:\ProjetsUe4\ue4-4.24.3-html5\Engine\Programs\AutomationTool\Saved\Logs\UBT-UE4Game-HTML5-Development.txt)  
AutomationTool exiting with ExitCode=5 (5)  
BUILD FAILED

---

<div class="post-metadata">

**Author:** ![MINEZATOR](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@MINEZATOR](https://forums.unrealengine.com/u/MINEZATOR)\
**Post date:** [April 30, 2021, 5:02pm UTC](https://forums.unrealengine.com/t/html5-packaging-failed-emcc-error-the-temporary-directory-error-temp-dir-not-found/227246/4 "2021-04-30T17:02:25Z")

</div>

Before these two errors, I had other errors when launching GenerateProjectFiles.bat

Node and python did not find because their directory name did not match.

it was stuck here :  
ue4-4.24.3-html5\Engine\Platforms\HTML5\Build\emsdk\emsdk-1.39.18\node\12.18.1\_64bit  
ue4-4.24.3-html5\Engine\Platforms\HTML5\Build\emsdk\emsdk-1.39.18\python\3.7.4\_64bit

These directories was of a more recent version, the script “GenerateProjectFiles.bat” was looking for an older version.  
So I renamed my directories for him to find node.exe and python.exe

It was maybe a bad idea ? My current problem may be related to this bad manipulation ?

---

<div class="post-metadata">

**Author:** ![warvstar](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@warvstar](https://forums.unrealengine.com/u/warvstar)\
**Post date:** [April 30, 2021, 7:26pm UTC](https://forums.unrealengine.com/t/html5-packaging-failed-emcc-error-the-temporary-directory-error-temp-dir-not-found/227246/5 "2021-04-30T19:26:36Z")

</div>

Ya I think so. It’s better to rename the paths in the source files but even then you will struggle for a while probably because the community repo you are using is not maintained. It’s possible, I currently use that repo but it’s not that easy to setup and you will have to fiddle with things. If you can use the official 4.23 version, you will have an easier time.

---

<div class="post-metadata">

**Author:** ![MINEZATOR](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@MINEZATOR](https://forums.unrealengine.com/u/MINEZATOR)\
**Post date:** [May 2, 2021, 3:54pm UTC](https://forums.unrealengine.com/t/html5-packaging-failed-emcc-error-the-temporary-directory-error-temp-dir-not-found/227246/6 "2021-05-02T15:54:00Z")

</div>

Thanks for your advices.

I finally managed to package my project by installing python in 3.7.4\_64bit version and node js in 12.18.1\_64bit version. Everything work fine !

for those who are in the same problem as me, with node js not found and python not found errors when generateProcjectFiles.bat : Install them in the specified versions by the path then restart HTML5Setup.sh

---

<div class="post-metadata">

**Author:** ![astlouis44](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@astlouis44](https://forums.unrealengine.com/u/astlouis44)\
**Post date:** [May 4, 2021, 8:06pm UTC](https://forums.unrealengine.com/t/html5-packaging-failed-emcc-error-the-temporary-directory-error-temp-dir-not-found/227246/7 "2021-05-04T20:06:02Z")

</div>

What kind of game/application are you working on for WebGL?
