Closed
Description
🐞 Bug report
Command (mark with an x
)
- new
- build
- serve
- test
- e2e
- generate
- add
- update
- lint
- extract-i18n
- run
- config
- help
- version
- doc
Is this a regression?
Yes, the previous version in which this bug was not present was: 13.3.7Description
When creating an empty workspace and adding an application, the ng build --watch
command works as expected. After adding a library to the workspace it does not work anymore. Running the command will throw the following error:
Error: Unknown argument: watch
🔬 Minimal Reproduction
ng new watchdemo --create-application=false
cd watchdemo
ng generate app showcase
- Add
--project=showcase
to the build + watch scripts in package.json npm run build
andnpm run watch
=> worksng generate lib comp
npm run build
=> works (builds the showcase app)npm run watch
=>Error: Unknown argument: watch
Repo Angular 14: https://github.com/rothsandro/repro-ng-cli-watch-14/
Repo Angular 13 (works): https://github.com/rothsandro/repro-ng-cli-watch-13/
🔥 Exception or Error
Error: Unknown argument: watch
🌍 Your Environment
Angular CLI: 14.0.0
Node: 16.13.0
Package Manager: npm 8.1.0
OS: darwin arm64
Angular: 14.0.0
... animations, cli, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, router
Package Version
---------------------------------------------------------
@angular-devkit/architect 0.1400.0
@angular-devkit/build-angular 14.0.0
@angular-devkit/core 14.0.0
@angular-devkit/schematics 14.0.0
@schematics/angular 14.0.0
ng-packagr 14.0.0
rxjs 7.5.5
typescript 4.7.3
Anything else relevant?