I have travis-ci
integrated with my GitHub account (https://github.com/pradeep0601/Angular5-Router-App).
When I updated @angular/cli
versio
For people who have simply cloned a project and trying to run it, you need to run npm install
first. I totally forgot to run this and was simply running ng serve
before installing node modules.
With recent version, without --migrate-only
I got the repo updated.
I did ng update
The Angular CLI configuration format has been changed, and your existing configuration can be updated automatically by running the following command:
ng update @angular/cli
Updating karma configuration
Updating configuration
Removing old config file (.angular-cli.json)
Writing config file (angular.json)
Some configuration options have been changed, please make sure to update any npm scripts which you may have modified.
DELETE .angular-cli.json
CREATE angular.json (3684 bytes)
UPDATE karma.conf.js (1040 bytes)
UPDATE src/tsconfig.spec.json (322 bytes)
UPDATE package.json (1340 bytes)
UPDATE tslint.json (3140 bytes)
I just had the same problem.
It's related to release v6.0.0-rc.2, https://github.com/angular/angular-cli/releases:
New configuration format. The new file can be found at angular.json (but .angular.json is also accepted). Running ng update on a CLI 1.7 project will move you to the new configuration.
I needed to execute:
ng update @angular/cli --migrate-only --from=1.7.4
This removed .angular-cli.json
and created angular.json
.
If this leads to your project using 1.7.4, install v6 locally:
npm install --save-dev @angular/cli@v6.0.0-rc.4
And try once again to update your project with:
ng update @angular/cli --migrate-only --from=1.7.4
If all sorts of updating commando's won't do it. Try deleting package-lock.json. And then run npm install. Did the trick for me after going through tons of update commando's.
Check your folder structure where you are executing the command, you should run the command 'ng serve' where there should be a angular.json file in the structure.
angular.json file will be generated by default when we run the command
npm install -g '@angular/cli' ng new Project_name then cd project_folder then, run ng serve. it worked for me
I also faced same issue and i just executed below command.
ng update @angular/cli --migrate-only --from=1.6.4
It simply delete angular-cli.json
and create angular.json
. You can find this in logs.
Once you start execution. You will be able to see below logs in your terminal.
Updating karma configuration
Updating configuration
Removing old config file (.angular-cli.json)
Writing config file (angular.json)
Some configuration options have been changed, please make sure to update any
npm scripts which you may have modified.
DELETE .angular-cli.json
CREATE angular.json (3599 bytes)
UPDATE karma.conf.js (962 bytes)
UPDATE src/tsconfig.spec.json (324 bytes)
UPDATE package.json (1405 bytes)
UPDATE tsconfig.json (407 bytes)
UPDATE tslint.json (3026 bytes)