Steps to Upgrade from Angular 5 To Anuglar 6
- If your project contains package-lock.json file delete it
- Create a file named npmignore in the root location of your project
- Update your Angular CLI locally, and migrate the configuration to the new angular.json format by running the following:
- npm install @angular/cli@6
- ng update @angular/cli@6
- Update all of your Angular framework packages to v6, and the correct version of RxJS and TypeScript.
- ng update @angular/core@6
- Try to run your project using ng serve, If you get any error saying angular.json is not found then run the below command
- ng update @angular/cli --migrate-only --from=1.7.4
- Now you can Run your project using the below Command "ng serve"