I would like to migrate from Angular5 to Angular6, following this answer
I tried to execute this three commands, to update .angular-cli.json to angular.json:
npm install -g @angular/cli
npm install @angular/cli
ng update @angular/cli
Unfortunately, there is still no angular.json. If I try to run ng serve
, I get this error:
Local workspace file ('angular.json') could not be found.
So I renamed .angular-cli.json to angular.json. But it did not help:
Schema validation failed with the following errors: Data path "" should NOT have additional properties(project). Error: Schema validation failed with the following errors: Data path "" should NOT have additional properties(project). at MergeMapSubscriber._registry.compile.pipe.operators_1.concatMap.validatorResult [as project] (C:\projects\my-app\node_modules\@angular-devkit\core\src\workspace\workspace.js:173:42) at MergeMapSubscriber._tryNext (C:\projects\my-app\node_modules\rxjs\internal\operators\mergeMap.js:122:27) at MergeMapSubscriber._next (C:\projects\my-app\node_modules\rxjs\internal\operators\mergeMap.js:112:18) at MergeMapSubscriber.Subscriber.next (C:\projects\my-app\node_modules\rxjs\internal\Subscriber.js:103:18) at MergeMapSubscriber.notifyNext (C:\projects\my-app\node_modules\rxjs\internal\operators\mergeMap.js:141:26) at InnerSubscriber._next (C:\projects\my-app\node_modules\rxjs\internal\InnerSubscriber.js:30:21) at InnerSubscriber.Subscriber.next (C:\projects\my-app\node_modules\rxjs\internal\Subscriber.js:103:18) at MapSubscriber._next (C:\projects\my-app\node_modules\rxjs\internal\operators\map.js:92:26) at MapSubscriber.Subscriber.next (C:\projects\my-app\node_modules\rxjs\internal\Subscriber.js:103:18) at SwitchMapSubscriber.notifyNext (C:\projects\my-app\node_modules\rxjs\internal\operators\switchMap.js:122:26)
Therefore I tried to run ng update @angular/core
, but I get this error:
Workspace needs to be loaded before it is used.
What do I wrong?