Migrating Angular 4.x to Angular 5 [duplicate]

You need to update all angular provided packages to their latest versions as follows:

npm install [email protected] --save-dev

npm install @angular/common@latest @angular/compiler@latest @angular/compiler-cli@latest @angular/core@latest @angular/forms@latest @angular/http@latest @angular/platform-browser@latest @angular/platform-browser-dynamic@latest @angular/platform-server@latest @angular/router@latest @angular/animations@latest --save

This should do all the necessary. Plus you could also update your angular cli that ships with angular 5 as standard version as follows:

npm uninstall -g @angular/cli
npm cache clean
npm install -g @angular/cli@latest

Here is the official blogpost by Angular team : https://angular-update-guide.firebaseapp.com/. This update guide will help you to migrate from any version to the latest one.

Leave a Comment