1
\$\begingroup\$

I get an error while trying to build a game for webgl. I have created a new 3d project with only a cube in it and have not created any scripts. When I try to build and run the webgl option, these are the errors I get.

    Failed running "C:/Program Files/Unity/Hub/Editor/2019.3.13f1/Editor/Data/PlaybackEngines/WebGLSupport\BuildTools\Emscripten_Win\python\2.7.5.3_64bit\python.exe" -E "C:/Program Files/Unity/Hub/Editor/2019.3.13f1/Editor/Data/PlaybackEngines/WebGLSupport\BuildTools\Emscripten\emcc" @"G:\webgl\Assets\..\Temp\emcc_arguments.resp"
stdout:
stderr:INFO:root:Checking JS engine ['G:\\nodejs\\node_modules\\npm\\bin', '--stack_size=8192', '--max-old-space-size=4096'] failed. Check your config file. Details: [Error 5] Access is deniedCRITICAL:root:The JavaScript shell (['G:\\nodejs\\node_modules\\npm\\bin', '--stack_size=8192', '--max-old-space-size=4096']) does not seem to work, check the paths in the config file
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
UnityEditor.BuildPlayerWindow+BuildMethodException: 3 errors
  at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (UnityEditor.BuildPlayerOptions options) [0x002bb] in <480b5a3bd3214ce5831f6dd8c68fdc55>:0 
  at UnityEditor.BuildPlayerWindow.CallBuildMethods (System.Boolean askForBuildLocation, UnityEditor.BuildOptions defaultBuildOptions) [0x00080] in <480b5a3bd3214ce5831f6dd8c68fdc55>:0 
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

This is what the editor log shows:

C:\Program Files\Unity\Hub\Editor\2019.3.13f1\Editor\Data\il2cpp/build/deploy/net471/il2cpp.exe exited after 228169 ms.
Filename: "C:/Program Files/Unity/Hub/Editor/2019.3.13f1/Editor/Data/PlaybackEngines/WebGLSupport\BuildTools\Emscripten_Win\python\2.7.5.3_64bit\python.exe"
Arguments: -E "C:/Program Files/Unity/Hub/Editor/2019.3.13f1/Editor/Data/PlaybackEngines/WebGLSupport\BuildTools\Emscripten\emcc" @"G:\webgl\Assets\..\Temp\emcc_arguments.resp"
index: -1
Failed running "C:/Program Files/Unity/Hub/Editor/2019.3.13f1/Editor/Data/PlaybackEngines/WebGLSupport\BuildTools\Emscripten_Win\python\2.7.5.3_64bit\python.exe" -E "C:/Program Files/Unity/Hub/Editor/2019.3.13f1/Editor/Data/PlaybackEngines/WebGLSupport\BuildTools\Emscripten\emcc" @"G:\webgl\Assets\..\Temp\emcc_arguments.resp"

stdout:
stderr:INFO:root:Checking JS engine ['G:\\nodejs\\node_modules\\npm\\bin', '--stack_size=8192', '--max-old-space-size=4096'] failed. Check your config file. Details: [Error 5] Access is deniedCRITICAL:root:The JavaScript shell (['G:\\nodejs\\node_modules\\npm\\bin', '--stack_size=8192', '--max-old-space-size=4096']) does not seem to work, check the paths in the config file

I'm not sure how to resolve this....Can someone please help...

\$\endgroup\$
5
  • \$\begingroup\$ Did you check the configuration file as the error messages suggested? What did you find? \$\endgroup\$
    – DMGregory
    May 16, 2020 at 11:00
  • \$\begingroup\$ @DMGregory , I'm not able to find this file...can you please let me know where it is generally saved.... \$\endgroup\$ May 16, 2020 at 11:22
  • \$\begingroup\$ Looks like "G:\nodejs\node_modules\npm\bin" or one folder higher might be fruitful places to search first. \$\endgroup\$
    – DMGregory
    May 16, 2020 at 11:23
  • \$\begingroup\$ @DMGregory , its working now....I had deleted nodejs from my system, removed the path from environment variable. Then I reinstalled it in my C drive, added the new path and restarted my system. and now its working fine...not sure what the issue was though...thanks for the help.... \$\endgroup\$ May 16, 2020 at 12:17
  • \$\begingroup\$ Great! Post those steps as an Answer below. \$\endgroup\$
    – DMGregory
    May 16, 2020 at 12:22

1 Answer 1

1
\$\begingroup\$

This is what worked for me:

  1. Uninstalled nodejs from the system along with the path from environment variable.
  2. Reinstalled nodejs in the C drive program files and added the new path in environment variable.
  3. Restarted the system and created new unity project and ran the webgl build.
\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .