UnrealEngineHTML5 / Documentation

540 stars 183 forks source link

NODEJS NOT FOUND #97

Closed adee-patel closed 3 years ago

adee-patel commented 3 years ago

When building ShaderCompileWorker I keep getting this error in Visual Studio 2019:

Severity Code Description Project File Line Suppression State Error NODEJS NOT FOUND: C:\Users\<username>\ue4-4.24.3-html5\Engine\Platforms\HTML5\Build\emsdk\emsdk-1.39.18\node\12.18.1_64bit\bin\node.exe ShaderCompileWorker C:\Users\<username>\ue4-4.24.3-html5\Engine\Intermediate\ProjectFiles\UnrealBuildTool 1

Screenshot 2021-06-10 214643

adee-patel commented 3 years ago

Just got this issue fixed if anyone need a solution please comment here. Happy to help.

nrabhiram commented 3 years ago

Hey, I'm facing a similar issue as well. Could you help me out?

mika314 commented 3 years ago

What is the fix? I have this error.

pepefeliblu commented 3 years ago

Just got this issue fixed if anyone need a solution please comment here. Happy to help.

Could you please share the fix? I am facing a similar error while trying to build the UnrealHeaderTool

mika314 commented 3 years ago

Ok, I have figured out the fix. You may notice in the logs something like node is missing or not installed (I do not remember the exact wording). What you need to do, extract the version from the path and do a full search, you will find a reference to this version in one of *.cs files. You need to update the version to the correct version. The correct version you can just find as a directory name.

In my case I needed to update this file:

modified   Engine/Platforms/HTML5/Source/Programs/UnrealBuildTool/HTML5SDKInfo.cs
@@ -20,7 +20,7 @@ namespace UnrealBuildTool
        // note: as of 1.39.18, emscripten fastcomp has been deprecated

        static string SDKVersion = "1.39.18";
-       static string NODE_VER = "12.18.1_64bit";
+       static string NODE_VER = "14.15.5_64bit";
        static string EMSDKTYPE = "upstream";

        static string PYTHON_VER = "3.7.4-pywin32_64bit"; // Only used on Windows; other platforms use built-in Python.
pepefeliblu commented 3 years ago

Ok, I have figured out the fix. You may notice in the logs something like node is missing or not installed (I do not remember the exact wording). What you need to do, extract the version from the path and do a full search, you will find a reference to this version in one of *.cs files. You need to update the version to the correct version. The correct version you can just find as a directory name.

In my case I needed to update this file:

modified   Engine/Platforms/HTML5/Source/Programs/UnrealBuildTool/HTML5SDKInfo.cs
@@ -20,7 +20,7 @@ namespace UnrealBuildTool
      // note: as of 1.39.18, emscripten fastcomp has been deprecated

      static string SDKVersion = "1.39.18";
-     static string NODE_VER = "12.18.1_64bit";
+     static string NODE_VER = "14.15.5_64bit";
      static string EMSDKTYPE = "upstream";

      static string PYTHON_VER = "3.7.4-pywin32_64bit"; // Only used on Windows; other platforms use built-in Python.

I can corroborate the missing NODEJS issue. And this seems to be the reasonable solution if you are still trying to build the engine from scratch.

I have opted to downgrade to Engine Version 4.23.1 because, when I finished the build, I was simply redirected to the UE4-HTML Docs.

I will probably avoid the HTML package route and simply create native apps (desktop/mobile) instead. Why?: