I am getting this error while running my application. Here are the details of my application.
Angular CLI: 7.3.3
Node: 10.15.1
Angular: 7.2.7
@angular-de
Same issue after trying to upgrade to Ng8 which failed due to dependency issues.
npm uninstall @angular-devkit/build-angular
then I used,
npm install @angular-devkit/build-angular@0.12.4
fixed it...
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
Following worked for me
npm uninstall @angular-devkit/build-angular
npm install @angular-devkit/build-angular@0.13.0
I did this change in package.json file, then it works.
"@angular-devkit/build-angular": "^0.803.23"
to
"@angular-devkit/build-angular": "^0.13.9"
You can simply audit your code and then
#sudo su
rm -rf package-lock.json node_modules
sudo npm i --save
I was also coming across this issue and for me when doing more updates more issues occurred.
What worked for me in the end was more or less to remove angular cli and re install it with these steps:
npm uninstall -g @angular/cli
npm cache clean --force
npm install -g @angular/cli
this helped me out source: how to uninstall angular/cli