'Cannot find configuration for task' error when building Angular 13 app in NX13 workspace with --preserveAngularCLILayout flag set
See original GitHub issueCurrent Behavior
We have an Angular application with NX workspace initialised via ng add @nrwl/workspace --preserveAngularCLILayout
command that is no longer compiling after updating to v13 of Angular and NX packages via either ng build
or nx build
.
Expected Behavior
Usually the Angular app compiles without errors. This has regressed since we updated Angular and and NX packages to 13.x last week.
Steps to Reproduce
Run these commands in a terminal to reproduce the error. I have also created a repo where you can install the dependencies and try to build with either ng build
or nx build
. You should see the same error.
npx ng new
< create a new Angular app (installs 13.0.0 as of today)
ng build
< build works
ng add @nrwl/workspace --preserveAngularCLILayout
< adds NX workspace
nx build
< build fails
Failure Logs
ng build
Error: Cannot find configuration for task test:build at getExecutorNameForTask (C:\Users\dbeazer\Downloads\test\node_modules@nrwl\workspace\src\tasks-runner\utils.js:127:15) at getExecutorForTask (C:\Users\dbeazer\Downloads\test\node_modules@nrwl\workspace\src\tasks-runner\utils.js:133:22) at getCustomHasher (C:\Users\dbeazer\Downloads\test\node_modules@nrwl\workspace\src\tasks-runner\utils.js:140:25) at TasksSchedule.<anonymous> (C:\Users\dbeazer\Downloads\test\node_modules@nrwl\workspace\src\tasks-runner\tasks-schedule.js:114:62) at Generator.next (<anonymous>) at C:\Users\dbeazer\Downloads\test\node_modules\tslib\tslib.js:117:75 at new Promise (<anonymous>) at __awaiter (C:\Users\dbeazer\Downloads\test\node_modules\tslib\tslib.js:113:16) at TasksSchedule.hashTask (C:\Users\dbeazer\Downloads\test\node_modules@nrwl\workspace\src\tasks-runner\tasks-schedule.js:113:38) at TasksSchedule.<anonymous> (C:\Users\dbeazer\Downloads\test\node_modules@nrwl\workspace\src\tasks-runner\tasks-schedule.js:58:24) Unexpected error: Error: Unable to load hasher for task “test:build:production” at getCustomHasher (C:\Users\dbeazer\Downloads\test\node_modules@nrwl\workspace\src\tasks-runner\utils.js:145:15) at TasksSchedule.<anonymous> (C:\Users\dbeazer\Downloads\test\node_modules@nrwl\workspace\src\tasks-runner\tasks-schedule.js:114:62) at Generator.next (<anonymous>) at C:\Users\dbeazer\Downloads\test\node_modules\tslib\tslib.js:117:75 at new Promise (<anonymous>) at __awaiter (C:\Users\dbeazer\Downloads\test\node_modules\tslib\tslib.js:113:16) at TasksSchedule.hashTask (C:\Users\dbeazer\Downloads\test\node_modules@nrwl\workspace\src\tasks-runner\tasks-schedule.js:113:38) at TasksSchedule.<anonymous> (C:\Users\dbeazer\Downloads\test\node_modules@nrwl\workspace\src\tasks-runner\tasks-schedule.js:58:24) at Generator.next (<anonymous>) at C:\Users\dbeazer\Downloads\test\node_modules\tslib\tslib.js:117:75
Environment
Node : 14.17.3 OS : darwin x64 npm : 8.1.2
nx : 13.4.3 @nrwl/angular : undefined @nrwl/cli : 13.4.3 @nrwl/cypress : undefined @nrwl/devkit : 13.4.3 @nrwl/eslint-plugin-nx : undefined @nrwl/express : undefined @nrwl/jest : 13.4.3 @nrwl/linter : 13.4.3 @nrwl/nest : undefined @nrwl/next : undefined @nrwl/node : undefined @nrwl/nx-cloud : undefined @nrwl/react : undefined @nrwl/react-native : undefined @nrwl/schematics : undefined @nrwl/tao : 13.4.3 @nrwl/web : undefined @nrwl/workspace : 13.4.3 @nrwl/storybook : undefined @nrwl/gatsby : undefined typescript : 4.4.4 rxjs : 7.4.0
Community plugins: @angular/animations: 13.0.3 @angular/common: 13.0.3 @angular/compiler: 13.0.3 @angular/core: 13.0.3 @angular/forms: 13.0.3 @angular/platform-browser: 13.0.3 @angular/platform-browser-dynamic: 13.0.3 @angular/router: 13.0.3 @angular-devkit/build-angular: 13.0.4 @angular/cli: 13.0.4 @angular/compiler-cli: 13.0.3
Issue Analytics
- State:
- Created 2 years ago
- Reactions:4
- Comments:9 (2 by maintainers)
Yup, same here.
still not able to build