Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

node.exe exited with code 134 Visual Studio

I am trying to build/run my .NET solution using Visual Studio 2019 and i get this error:

"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VisualStudio\NodeJs\node.exe" exited with code 134.
WebTranslations  C:\Program Files (x86)\Microsoft SDKs\TypeScript\3.8\build\Microsoft.TypeScript.targets 551

I think this has something to do with memory, because if i restart my pc i can build few times, but then i start getting same error I tried playing with node_options max-old-space-size but no luck

like image 232
Nemanja Malocic Avatar asked Aug 26 '26 17:08

Nemanja Malocic


1 Answers

From https://developercommunity.visualstudio.com/t/node-options-env-var-causes-vs-2017-to-crash/241366#T-N368702-N368874-N368902

Zoey Riordan [MSFT]:

Unfortunately this is caused by the fact that the nodejs process we run is 32-bit. In 32-bit node you cannot set max_old_space_size above 4095 since 32-bit process are not able to allocate a full 4GB of heap space. In order to make this work you can choose a smaller heap size or only set the flag on applications which need that amount of heap.

I tried with different values below 4096 for max_old_space_size and found values that removed this build error:

max-old-space-size Success? Error message
4096 no node.exe exited with code 134
4080 no node.exe exited with code 134
4076 no node.exe exited with code 134
4075 no node.exe exited with code 134
4074 no node.exe exited with code -1073741819
4073 no node.exe exited with code -1073741819
4072 no node.exe exited with code -1073741819
4071 yes
4070 yes
4068 yes
4064 yes
4000 yes

(I'm not sure if this depends on the project being compiled.)

like image 72
Andreas Bilger Avatar answered Aug 31 '26 03:08

Andreas Bilger



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!