nx: Bug 15.3.3: can not find configuration if colon (`:`) is used in a name of npm script, like `build:dev`

Current Behavior

npx nx run lib-zero:build:dev --verbose

results in

Important: I am running build:dev, but task graph is run with build target, because colon has a special meaning

 >  NX   Cannot find configuration for task lib-zero:build


Error: Cannot find configuration for task lib-zero:build
    at ProcessTasks.createTask (__root_folder__\client-generate\node_modules\nx\src\tasks-runner\create-task-graph.js:98:19)
    at ProcessTasks.processTasks (__root_folder__\client-generate\node_modules\nx\src\tasks-runner\create-task-graph.js:19:35)
    at createTaskGraph (__root_folder__\client-generate\node_modules\nx\src\tasks-runner\create-task-graph.js:133:21)    
    at __root_folder__\client-generate\node_modules\nx\src\tasks-runner\run-command.js:83:71
    at Generator.next (<anonymous>)
    at __root_folder__\client-generate\node_modules\tslib\tslib.js:118:75
    at new Promise (<anonymous>)
    at Object.__awaiter (__root_folder__\client-generate\node_modules\tslib\tslib.js:114:16)
    at __root_folder__\client-generate\node_modules\nx\src\tasks-runner\run-command.js:79:114
    at __root_folder__\client-generate\node_modules\nx\src\utils\params.js:10:26

Expected Behavior

should build 😄

Github Repo

https://github.com/valorkin/nx-cache-issue-13898

Steps to Reproduce

  1. npx create-nx-workspace with react
  2. generate react lib with config:npmScripts
  3. rename build to build:dev in package.json of lib
  4. try to build it

Nx Report

Node : 18.12.1
   OS   : win32 x64
   npm  : 9.2.0

   nx : 15.3.3
   @nrwl/angular : Not Found
   @nrwl/cypress : Not Found
   @nrwl/detox : Not Found
   @nrwl/devkit : 15.3.3
   @nrwl/esbuild : Not Found
   @nrwl/eslint-plugin-nx : 15.3.3
   @nrwl/expo : Not Found
   @nrwl/express : Not Found
   @nrwl/jest : 15.3.3
   @nrwl/js : 15.3.3
   @nrwl/linter : 15.3.3
   @nrwl/nest : Not Found
   @nrwl/next : Not Found
   @nrwl/node : Not Found
   @nrwl/nx-cloud : Not Found
   @nrwl/nx-plugin : 15.3.3
   @nrwl/react : 15.3.3
   @nrwl/react-native : Not Found
   @nrwl/rollup : 15.3.3
   @nrwl/schematics : Not Found
   @nrwl/storybook : Not Found
   @nrwl/web : Not Found
   @nrwl/webpack : Not Found
   @nrwl/workspace : 15.3.3
   typescript : 4.8.4

Failure Logs

No response

Additional Information

No response

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 17 (8 by maintainers)

Most upvoted comments

Caching should work, but I can validate that. If there is an issue with the console integration for these, can you open an issue on the console repo? https://github.com/nrwl/nx-console