CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory ionic 3 Mac issue ipa

Hello,
Currently I am trying to build my ionic project to ios ipa file but I ran into CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory issue when in hit ionic cordova build ios --prod --release. I googled and tried many fixes no luck.

I am quite new to Apple Mac book Pro. I might be missing some node version or something. I had same issue while building apk file but it short out after I update my android studio it was in window system.
old link (CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory ionic 3 Build prod Issue)

In mac I could not find this (google common fix)

node_modules/.bin/ionic-app-scripts.cmd

By adding:

@IF EXIST “%~dp0\node.exe” (
“%~dp0\node.exe” “%~dp0…@ionic\app-scripts\bin\ionic-app-scripts.js” %*
) ELSE (
@SETLOCAL
@SET PATHEXT=%PATHEXT:;.JS;=;%
node --max_old_space_size=4096 “%~dp0…@ionic\app-scripts\bin\ionic-app-scripts.js” %*
)

Here are the error snapshots
1

2

3

Ionic Info

Thanks for your help.

Were you able to solve this?

I was getting an issue in my mac because of java script. I got to know that was happening because of iTunes. It was error 54 iTunes. Can anybody please tell me how to fix it?