I had this issue, this is how i have solved it. The problem mostly is that your Angular version is not supporting your Node.js version for the build. So the best solution is to upgrade your Node.js to the most current stable one.
For a clean upgrade of Node.js, i advise using n. if you are using Mac.
npm install -g n
npm cache clean -f
sudo n stable
npm update -g
and now check that you are updated:
node -v
npm -v
For more details, check this link: here