Atualize para o Angular 5 mais recente
Pacotes Angular Dep:
npm install @angular/{animations,common,compiler,core,forms,http,platform-browser,platform-browser-dynamic,router}@latest --save
Outros pacotes que são instalados pelo CLI angular
npm install --save core-js@latest rxjs@latest zone.js@latest
Pacotes de desenvolvimento angular:
npm install --save-dev @angular/{compiler-cli,cli,language-service}@latest
Tipos de pacotes Dev:
npm install --save-dev @types/{jasmine,jasminewd2,node}@latest
Outros pacotes que são instalados como dev dev pelo angular cli:
npm install --save-dev codelyzer@latest jasmine-core@latest jasmine-spec-reporter@latest karma@latest karma-chrome-launcher@latest karma-cli@latest karma-coverage-istanbul-reporter@latest karma-jasmine@latest karma-jasmine-html-reporter@latest protractor@latest ts-node@latest tslint@latest
Instale a versão mais recente suportada usada pelo angular cli (não faça @latest):
npm install --save-dev typescript@2.4.2
Renomeie o arquivo angular-cli.json para .angular-cli.json e atualize o conteúdo:
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"project": {
"name": "project3-example"
},
"apps": [
{
"root": "src",
"outDir": "dist",
"assets": [
"assets",
"favicon.ico"
],
"index": "index.html",
"main": "main.ts",
"polyfills": "polyfills.ts",
"test": "test.ts",
"tsconfig": "tsconfig.app.json",
"testTsconfig": "tsconfig.spec.json",
"prefix": "app",
"styles": [
"styles.css"
],
"scripts": [],
"environmentSource": "environments/environment.ts",
"environments": {
"dev": "environments/environment.ts",
"prod": "environments/environment.prod.ts"
}
}
],
"e2e": {
"protractor": {
"config": "./protractor.conf.js"
}
},
"lint": [
{
"project": "src/tsconfig.app.json",
"exclude": "**/node_modules/**"
},
{
"project": "src/tsconfig.spec.json",
"exclude": "**/node_modules/**"
},
{
"project": "e2e/tsconfig.e2e.json",
"exclude": "**/node_modules/**"
}
],
"test": {
"karma": {
"config": "./karma.conf.js"
}
},
"defaults": {
"styleExt": "css",
"component": {}
}
}
npm install angular2@2.0.0beta.14 --save
deveria fazer isso, eu acho.