Warning from ng update
See original GitHub issueBug Report or Feature Request (mark with an x
)
- [x] bug report -> please search issues before submitting
- [ ] feature request
Command (mark with an x
)
- [ ] new
- [ ] build
- [ ] serve
- [ ] test
- [ ] e2e
- [ ] generate
- [ ] add
- [x] update
- [ ] lint
- [ ] xi18n
- [ ] run
- [ ] config
- [ ] help
- [ ] version
- [ ] doc
Versions
Node: v10.10.0 NPM 6.4.1
_ _ ____ _ ___
/ \ _ __ __ _ _ _| | __ _ _ __ / ___| | |_ _|
/ △ \ | '_ \ / _` | | | | |/ _` | '__| | | | | | |
/ ___ \| | | | (_| | |_| | | (_| | | | |___| |___ | |
/_/ \_\_| |_|\__, |\__,_|_|\__,_|_| \____|_____|___|
|___/
Angular CLI: 6.2.2
Node: 10.10.0
OS: darwin x64
Angular: 6.1.7
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router
Package Version
------------------------------------------------------------
@angular-devkit/architect 0.8.2
@angular-devkit/build-angular 0.8.2
@angular-devkit/build-ng-packagr 0.8.2
@angular-devkit/build-optimizer 0.8.2
@angular-devkit/build-webpack 0.8.2
@angular-devkit/core 0.8.2
@angular-devkit/schematics 0.8.2
@angular/cli 6.2.2
@ngtools/json-schema 1.1.0
@ngtools/webpack 6.2.2
@schematics/angular 0.8.2
@schematics/update 0.8.2
ng-packagr 4.1.1
rxjs 6.2.2
typescript 2.9.2
webpack 4.19.0
Repro steps
run ng update
The log given by the failure
WARNING: This command may not execute successfully. The package/collection may not support the ‘targets’ field within ‘/Users/e041115/dev/dispute/ui/angular.json’. This can be corrected by renaming the following ‘targets’ fields to ‘architect’:
- Line: 12; Column: 10
- Line: 126; Column: 10
- Line: 155; Column: 10
- Line: 190; Column: 10
Desired functionality
Making these changes is causes ng update not to warn but then all other commands fail as the angular.json file no longer conforms to the schema. Either update the schema or remove this warning.
Mention any other details that might be useful
Caused by this change: https://github.com/angular/angular-cli/commit/9e7391c685e7b296e68e21fedb1cc7989a9405c8#diff-9dfd89ed6a15b8cb93c53b62edc7eb85
Issue Analytics
- State:
- Created 5 years ago
- Comments:10 (4 by maintainers)
Top Results From Across the Web
Angular warning stack after the update from version 9 to 10 ...
I just updated my angular version from 9 to 10. I followed the below steps to do so. As per the Angular Update...
Read more >ng update - Angular
Shows a help message for this command in the console. Only perform a migration, do not update the installed version. The name of...
Read more >How To Update Angular CLI To Latest Version
To update Angular CLI to latest version Angular, use ng update @angular/core @angular/cli@latest command.
Read more >Don't be afraid and just `ng update`! | by beeman | ITNEXT
Analyse the part of the app that breaks it by exclusion. First, try to get a minimal Angular app running (only an AppModule...
Read more >How to update local Angular CLI version? in package.json file ...
2) is greater than your local version (7.3.8). The local Angular CLI version is used. To disable this warning use "ng config -g...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
my angular-cli is updated to 6.2.2 i changed [targets] to [architect] fixed this warning
Can you provide more details on what you changed here? Each project in
angular.json
should have either anarchitect
section or atargets
section but never both. And there should not be more than one of either within a project.