I am trying to update my project from angular 5 to angular 7. For this first is update @angular/cli gloabaly and locally then I installed @angular/cli locally then update ng module and other related commands.
Now, I check my ng --version it is showing me angular 7, but my project is not running its always throwing below error:
Below is my script in package.json file:
"scripts": {
"start": "cross-env NODE_ENV=development webpack-dev-server --port=9000 --
content-base wwwroot/",
"build": "cross-env NODE_ENV=development webpack --progress",
"prod": "cross-env NODE_ENV=production webpack --progress"
}
Upgrade Angular CLI globally First, check your current Angular CLI version by running command. Note that if you run this command inside Angular project directory then you will get Angular project's version. If you run it outside Angular version then you will get global Angular CLI version.
As of now, going from Angular 10 to Angular 11 requires no changes to your current system. You need to run ng update @angular/core @angular/cli. It will push you to the Angular 11 update. The ng update part will automatically migrate you to TypeScript 4.0.
Steps of updating angular latest version 7:
1 ) You need to update your angular cli.
npm uninstall -g angular-cli
npm cache clean or npm cache verify
npm install -g @angular/cli@latest
(c.f https://cli.angular.io/)
2) You need to upgrade your project version as per suggestion of angular update guide. Angular update guide website link Angular version upgrade guide website link (Click here)
3) On this website select your older version and your desired latest version after that click on 'Show me how to update'
4) After click on this button website provide a number of steps. You need to follow this step to upgrade your Angular version
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With