Soy loader stopped working

Atlassian soy loader library stopped working and I am not able to figure out why

ERROR in ./src/dialog/template/dialog.soy
    Module build failed (from ./node_modules/@atlassian/soy-loader/index.js):
    Error: Could not read /var/folders/cg/bk6655y557df84n6rcg5xh100000gn/T/tmp-52782-h8PxyTZ1hYM6/template0.soy.js. Another file in this queue probably failed
        at /Users/saurabh/workspace/test/node_modules/@atlassian/soy-loader/index.js:102:27
        at Array.forEach (<anonymous>)
        at ChildProcess.<anonymous> (/Users/saurabh/workspace/test/node_modules/@atlassian/soy-loader/index.js:88:13)
        at ChildProcess.emit (node:events:518:28)
        at maybeClose (node:internal/child_process:1105:16)
        at ChildProcess._handle.onexit (node:internal/child_process:305:5)
     @ ./src/dialog/js/dialog.js 5:13-46
     @ ./src/js/init/index.js
     @ multi ./src/js/init/index.js

I am facing the developers dilemma. My code was working yesterday and it stopped working today. This error is coming at the time building using npm run ‘build’. Build script is ‘webpack’.

Soy loader version -
@atlassian/soy-loader”: “^4.3.1”,

Edit 1 :
Found the reason for error. The above error only occurs when you are using java 17. It can be rectified using java 8 or java 11.

Old
Don’t know why it stopped and why it is working again. :confused: