Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

storybook "No Eslint configuration" issue after upgrading to v19 #26388

Closed
1 of 4 tasks
rexkenley opened this issue Jun 5, 2024 · 2 comments · Fixed by #26409
Closed
1 of 4 tasks

storybook "No Eslint configuration" issue after upgrading to v19 #26388

rexkenley opened this issue Jun 5, 2024 · 2 comments · Fixed by #26409
Assignees
Labels
outdated scope: linter Issues related to Eslint support in Nx type: bug

Comments

@rexkenley
Copy link

Current Behavior

When I try to run storybook after the upgrade, I am getting this error. The c:(redacted) folder is outside of the project folder that has storybook, so it is correct that there is no eslint config file because that folder doesn't contain any ts/js files.

node:internal/process/promises:289
triggerUncaughtException(err, true /* fromPromise */);
^

[Failed to process project graph. Run "nx reset" to fix this. Please report the issue if you keep seeing it.
The "@nx/eslint/plugin" plugin threw an error while creating nodes from .eslintrc.base.json:
Error: No ESLint configuration found in c:(redacted).
at CascadingConfigArrayFactory._finalizeConfigArray (c:(redacted)\node_modules@eslint\eslintrc
\lib\cascading-config-array-factory.js:521:19)
at CascadingConfigArrayFactory.getConfigArrayForFile (c:(redacted)\node_modules@eslint\eslintr
c\lib\cascading-config-array-factory.js:312:21)
at CLIEngine.isPathIgnored (c:(redacted)\node_modules\eslint\lib\cli-engine\cli-engine.js:1000:
18)
at ESLint.isPathIgnored (c:(redacted)\node_modules\eslint\lib\eslint\eslint.js:681:26)
at c:(redacted)\node_modules@nx\eslint\src\plugins\plugin.js:58:36
at Array.map ()
at Array.exports.createNodes (c:(redacted)\node_modules@nx\eslint\src\plugins\plugin.js:47:47)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at async c:(redacted)\node_modules\nx\src\project-graph\plugins\utils.js:49:27
at async Promise.all (index 0)] {
name: 'ProjectGraphError'
}

Node.js v20.11.1

Expected Behavior

Run storybook

GitHub Repo

No response

Steps to Reproduce

  1. Migrate v18 to v19
  2. Run storybook

Nx Report

Failed to process project graph.

Failure Logs

No response

Package Manager Version

10.2.4

Operating System

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

Additional Information

No response

@rexkenley
Copy link
Author

rexkenley commented Jun 5, 2024

1 solution I tried is to add empty .eslintrc.json files to individual folders. It works but I don't think this is the right solution since these folders are not dev folders.

The versions I found this issue with are 19.1.2 and 19.2

19.2 error stack, it is slightly different compared to 19.1.2

Failed to process project graph. Run "nx reset" to fix this. Please report the issue if you keep seeing it.
AggregateCreateNodesError: An error occurred while processing files for the @nx/eslint/plugin plugin.
- .eslintrc.base.json: No ESLint configuration found in C:(redacted project folder that is a sibling to the project where storybook resides).
at createNodesFromFiles (C:(redacted)\node_modules\nx\src\project-graph\plugins\utils.js:58:15)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async exports.createNodesV2 (C:(redacted)\node_modules@nx\eslint\src\plugins\plugin.js:94:20)
at async LoadedNxPlugin.createNodes (C:(redacted)\node_modules\nx\src\project-graph\plugins\internal-api.js:31:36)
at async LoadedNxPlugin.createNodes. (C:(redacted)\node_modules\nx\src\project-graph\plugins\internal-api.js:41:28)
at async Promise.all (index 2)
at async processFilesAndCreateAndSerializeProjectGraph (C:(redacted)\node_modules\nx\src\daemon\server\project-graph-incremen
tal-recomputation.js:148:43)
at async getCachedSerializedProjectGraphPromise (C:(redacted)\nx\src\daemon\server\project-graph-incremental-rec
omputation.js:46:16)
at async handleRequestProjectGraph (C:(redacted)\nx\src\daemon\server\handle-request-project-graph.js:12:24)
at async handleResult (C:(redacted)\nx\src\daemon\server\server.js:130:16)

@FrozenPandaz FrozenPandaz added the scope: linter Issues related to Eslint support in Nx label Jun 5, 2024
FrozenPandaz pushed a commit that referenced this issue Jun 6, 2024
#26409)

<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

<!-- Please make sure that your commit message follows our format -->
<!-- Example: `fix(nx): must begin with lowercase` -->

## Current Behavior
<!-- This is the behavior we have today -->

The `@nx/eslint/plugin` globs for `.eslintrc.base.json` and
`eslint.base.config.js` workspace root files, which are not valid ESLint
config filenames. The ESLint CLI wouldn't pick them up directly, and we
shouldn't infer or process them. They are only used as part of a valid
config file name that extends from them.

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->

The `@nx/eslint/plugin` only globs for valid ESLint config filenames.

## Related Issue(s)
<!-- Please link the issue being fixed so it gets closed when this is
merged. -->

Fixes #26388
Copy link

github-actions bot commented Jul 8, 2024

This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 8, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated scope: linter Issues related to Eslint support in Nx type: bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants