Javascript heap memory issue

When i try to pass the command “npm run build” from my react-app, the process is exited in the middle and throws a below error.

Error : The build failed because the process exited too early. This probably means the system ran out of memory or someone called kill -9 on the process.

But coming to my VM, my free space is as below :roll_eyes:

Please help me out, why this process is exited when i run “npm run build” command!!

In my local machine, the build is happening correctly, but when coming to jenkins this issue occurs

I would start with finding out what the differences are between the two environments.

Run printenv/set/export (depending on os) on both envs. Run version checks on all your important tools (ex node -v)

If you are caching node modules or anything I recommend deleting the cache

Let us know what the results of that are.

Important Tools Versions are same in local and VM, Cache node modules are also deleted even though same issue. i have run printenv/set/export it what exactly use of it and need to be checked??