diff --git a/packages/angular-cli/upgrade/version.ts b/packages/angular-cli/upgrade/version.ts index 39117b7ba0b6..58e8229a5818 100644 --- a/packages/angular-cli/upgrade/version.ts +++ b/packages/angular-cli/upgrade/version.ts @@ -105,11 +105,11 @@ export class Version { if (v.isLocal()) { console.warn(yellow('Using a local version of angular. Proceeding with care...')); } else { - if (v.major != 2 || ((v.minor == 3 && v.patch == 0) || v.minor < 3)) { + if (v.major < 2 || (v.major < 2 && v.minor < 3) || (v.major < 2 && v.minor < 3 && v.patch < 1)) { console.error(bold(red(stripIndents` This version of CLI is only compatible with angular version 2.3.1 or better. Please upgrade your angular version, e.g. by running: - + npm install @angular/core@latest ` + '\n'))); process.exit(3); @@ -129,7 +129,7 @@ export class Version { It seems like you're using a project generated using an old version of the Angular CLI. The latest CLI now uses webpack and has a lot of improvements including a simpler workflow, a faster build, and smaller bundles. - + To get more info, including a step-by-step guide to upgrade the CLI, follow this link: https://github.com/angular/angular-cli/wiki/Upgrading-from-Beta.10-to-Beta.14 ` + '\n')));