Skip to content

@nx/js:lib generator throws "Cannot find configuration for '@tryout-nx/pkg1'" #30089

Open
@zaicevas

Description

Current Behavior

 NX   Cannot find configuration for '@tryout-nx/pkg1'

Error: Cannot find configuration for '@tryout-nx/pkg1'
    at readProjectConfiguration (/private/var/folders/f0/t6q4hc8n6wqcwxxnzqqwg4p40000gp/T/tmp-95684-aPNPyku7LVCh/node_modules/.pnpm/nx@20.4.4/node_modules/nx/src/generators/utils/project-configuration.js:135:15)
    at normalizeOptions (/private/var/folders/f0/t6q4hc8n6wqcwxxnzqqwg4p40000gp/T/tmp-95684-aPNPyku7LVCh/node_modules/.pnpm/@nx+jest@20.4.4_@babel+traverse@7.26.9_@types+node@22.13.4_babel-plugin-macros@3.1.0_nx@20.4._k5qxbhxm6cpy4uzj2ty6fffxwy/node_modules/@nx/jest/src/generators/configuration/configuration.js:47:59)
    at configurationGeneratorInternal (/private/var/folders/f0/t6q4hc8n6wqcwxxnzqqwg4p40000gp/T/tmp-95684-aPNPyku7LVCh/node_modules/.pnpm/@nx+jest@20.4.4_@babel+traverse@7.26.9_@types+node@22.13.4_babel-plugin-macros@3.1.0_nx@20.4._k5qxbhxm6cpy4uzj2ty6fffxwy/node_modules/@nx/jest/src/generators/configuration/configuration.js:59:21)
    at configurationGenerator (/private/var/folders/f0/t6q4hc8n6wqcwxxnzqqwg4p40000gp/T/tmp-95684-aPNPyku7LVCh/node_modules/.pnpm/@nx+jest@20.4.4_@babel+traverse@7.26.9_@types+node@22.13.4_babel-plugin-macros@3.1.0_nx@20.4._k5qxbhxm6cpy4uzj2ty6fffxwy/node_modules/@nx/jest/src/generators/configuration/configuration.js:56:12)
    at addJest (/Users/tomas.zaicevas/reps/tryout-nx/node_modules/.pnpm/@nx+js@20.4.4_@babel+traverse@7.26.9_@swc-node+register@1.9.2_@swc+core@1.5.29_@swc+helpers@0_gbfllekea2bbjhqjzh5ji6b3u4/node_modules/@nx/js/src/generators/library/library.js:494:18)
    at libraryGeneratorInternal (/Users/tomas.zaicevas/reps/tryout-nx/node_modules/.pnpm/@nx+js@20.4.4_@babel+traverse@7.26.9_@swc-node+register@1.9.2_@swc+core@1.5.29_@swc+helpers@0_gbfllekea2bbjhqjzh5ji6b3u4/node_modules/@nx/js/src/generators/library/library.js:90:36)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async /Users/tomas.zaicevas/reps/tryout-nx/node_modules/.pnpm/nx@20.4.4_@swc-node+register@1.9.2_@swc+core@1.5.29_@swc+helpers@0.5.15__@swc+types@0.1.17_ty_jfobu6ufyo2o2vxxyxvefuu2ym/node_modules/nx/src/command-line/generate/generate.js:240:26
    at async handleErrors (/Users/tomas.zaicevas/reps/tryout-nx/node_modules/.pnpm/nx@20.4.4_@swc-node+register@1.9.2_@swc+core@1.5.29_@swc+helpers@0.5.15__@swc+types@0.1.17_ty_jfobu6ufyo2o2vxxyxvefuu2ym/node_modules/nx/src/utils/handle-errors.js:8:24)
    at async Object.handler (/Users/tomas.zaicevas/reps/tryout-nx/node_modules/.pnpm/nx@20.4.4_@swc-node+register@1.9.2_@swc+core@1.5.29_@swc+helpers@0.5.15__@swc+types@0.1.17_ty_jfobu6ufyo2o2vxxyxvefuu2ym/node_modules/nx/src/command-line/generate/command-object.js:13:22)

Expected Behavior

Library is generated. I have narrowed that the issue is due to choosing either eslint or jest.

GitHub Repo

https://github.com/zaicevas/nx-reproducible-issue

Steps to Reproduce

  1. Clone repo
  2. npx nx g @nx/js:lib packages/pkg1 --publishable --importPath=@my-org/pkg1
  3. Choose tsc -> eslint -> jest

Nx Report

Node           : 20.17.0
OS             : darwin-arm64
Native Target  : aarch64-macos
pnpm           : 9.11.0

nx (global)  : 20.4.1
nx           : 20.4.4
@nx/js       : 20.4.4
typescript   : 5.7.3
---------------------------------------
Registered Plugins:
@nx/js/typescript

Failure Logs

See above.

Package Manager Version

pnpm 9.11.0

Operating System

  • macOS
  • Linux
  • Windows
  • Other (Please specify)

Additional Information

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions