nrwl / nx

Smart Monorepos · Fast CI
https://nx.dev
MIT License
23.33k stars 2.33k forks source link

Can't run any target (task) #28103

Open trumbitta opened 2 days ago

trumbitta commented 2 days ago

Current Behavior

Due to #28097 I have now a new workspace with Yarn 3.8.5, no PnP, and just an empty React application.

Running any target for the application fails and asks for nx reset to fix the graph. nx reset doesn't fix the problem.

Expected Behavior

Being able to serve, test, etc my new application.

GitHub Repo

No response

Steps to Reproduce

  1. npx create-nx-workspace@latest --pm=yarn
  2. cd my-workspace
  3. yarn set version 3.8.5
  4. yarn (this also automatically configures nodeLinker to node-modules)
  5. yarn nx add @nx/react
  6. yarn nx g @nx/react:app --directory=packages/my-app
  7. yarn nx serve my-app

Nx Report

Unavailable due to the issue at hand

Failure Logs

❯ yarn nx serve redacted --verbose

 NX   Failed to process project graph. Run "nx reset" to fix this. Please report the issue if you keep seeing it. See errors below.

Failed to process project graph. Run "nx reset" to fix this. Please report the issue if you keep seeing it.
      An error occurred while processing files for the @nx/eslint/plugin plugin.
    - eslint.config.js: Config (unnamed): Key "rules": Key "constructor-super": structuredClone is not defined
      ConfigError: Config (unnamed): Key "rules": Key "constructor-super": structuredClone is not defined
          at rethrowConfigError (/Redacted/redacted/node_modules/@eslint/config-array/dist/cjs/index.cjs:303:8)
          at /Redacted/redacted/node_modules/@eslint/config-array/dist/cjs/index.cjs:1098:5
          at Array.reduce (<anonymous>)
          at FlatConfigArray.getConfigWithStatus (/Redacted/redacted/node_modules/@eslint/config-array/dist/cjs/index.cjs:1091:43)
          at FlatConfigArray.getConfig (/Redacted/redacted/node_modules/@eslint/config-array/dist/cjs/index.cjs:1120:15)
          at ESLint.calculateConfigForFile (/Redacted/redacted/node_modules/eslint/lib/eslint/eslint.js:1276:24)
          at async ESLint.isPathIgnored (/Redacted/redacted/node_modules/eslint/lib/eslint/eslint.js:1298:24)
          at async /Redacted/redacted/node_modules/@nx/eslint/src/plugins/plugin.js:123:19
          at async Promise.all (index 0)
          at async internalCreateNodesV2 (/Redacted/redacted/node_modules/@nx/eslint/src/plugins/plugin.js:106:5)
    - packages/redacted/eslint.config.js: Config (unnamed): Key "rules": Key "constructor-super": structuredClone is not defined
      ConfigError: Config (unnamed): Key "rules": Key "constructor-super": structuredClone is not defined
          at rethrowConfigError (/Redacted/redacted/node_modules/@eslint/config-array/dist/cjs/index.cjs:303:8)
          at /Redacted/redacted/node_modules/@eslint/config-array/dist/cjs/index.cjs:1098:5
          at Array.reduce (<anonymous>)
          at FlatConfigArray.getConfigWithStatus (/Redacted/redacted/node_modules/@eslint/config-array/dist/cjs/index.cjs:1091:43)
          at FlatConfigArray.getConfig (/Redacted/redacted/node_modules/@eslint/config-array/dist/cjs/index.cjs:1120:15)
          at ESLint.calculateConfigForFile (/Redacted/redacted/node_modules/eslint/lib/eslint/eslint.js:1276:24)
          at async ESLint.isPathIgnored (/Redacted/redacted/node_modules/eslint/lib/eslint/eslint.js:1298:24)
          at async /Redacted/redacted/node_modules/@nx/eslint/src/plugins/plugin.js:123:19
          at async Promise.all (index 0)
          at async internalCreateNodesV2 (/Redacted/redacted/node_modules/@nx/eslint/src/plugins/plugin.js:106:5)
    - packages/redacted-e2e/eslint.config.js: Config "cypress/recommended": Key "rules": Key "cypress/no-assigning-return-values": structuredClone is not defined
      ConfigError: Config "cypress/recommended": Key "rules": Key "cypress/no-assigning-return-values": structuredClone is not defined
          at rethrowConfigError (/Redacted/redacted/node_modules/@eslint/config-array/dist/cjs/index.cjs:303:8)
          at /Redacted/redacted/node_modules/@eslint/config-array/dist/cjs/index.cjs:1098:5
          at Array.reduce (<anonymous>)
          at FlatConfigArray.getConfigWithStatus (/Redacted/redacted/node_modules/@eslint/config-array/dist/cjs/index.cjs:1091:43)
          at FlatConfigArray.getConfig (/Redacted/redacted/node_modules/@eslint/config-array/dist/cjs/index.cjs:1120:15)
          at ESLint.calculateConfigForFile (/Redacted/redacted/node_modules/eslint/lib/eslint/eslint.js:1276:24)
          at async ESLint.isPathIgnored (/Redacted/redacted/node_modules/eslint/lib/eslint/eslint.js:1298:24)
          at async /Redacted/redacted/node_modules/@nx/eslint/src/plugins/plugin.js:123:19
          at async Promise.all (index 0)
          at async internalCreateNodesV2 (/Redacted/redacted/node_modules/@nx/eslint/src/plugins/plugin.js:106:5)

Package Manager Version

No response

Operating System

Additional Information

No response

trumbitta commented 2 days ago

Works with create-nx-workspace@previous (18.3.5)

binarybro commented 1 day ago

@trumbitta Had an issue with Nx creating an empty graph. Maybe it is related? Please have a look at my comment here: https://github.com/nrwl/nx/issues/28123#issuecomment-2376931632

trumbitta commented 9 hours ago

@trumbitta Had an issue with Nx creating an empty graph. Maybe it is related? Please have a look at my comment here: #28123 (comment)

Thanks for the pointer @binarybro ! I checked, and I don't have any .gitignore in parent directories from there to / 😞