nrwl / nx

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

Failed to process project graph #26627

Closed draylegend closed 2 months ago

draylegend commented 3 months ago

Current Behavior

Every nx command leads to this error:

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

Expected Behavior

Should run any nx command without error

GitHub Repo

No response

Steps to Reproduce

Nx Report

`nx report` doesn't work

Failure Logs

No response

Package Manager Version

bun v1.1.15

Operating System

Additional Information

WSL version: 2.1.5.0 Kernel version: 5.15.146.1-2 WSLg version: 1.0.60 MSRDC version: 1.2.5105 Direct3D version: 1.611.1-81528511 DXCore version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp Windows version: 10.0.22631.3737

LayZeeDK commented 3 months ago

Hi @draylegend,

Please add the --verbose option to a failing Nx command and paste the output in this issue, for example nx reset --verbose or nx affected --targets=lint --verbose.

draylegend commented 3 months ago

@LayZeeDK after running nx report --verbose I still get the same error without any additional infos

a88zach commented 3 months ago

@draylegend you may want to look at the solution here: https://github.com/nrwl/nx/issues/26556#issuecomment-2195041213

I had to add an empty options object to the plugins listed in the nx.json

draylegend commented 3 months ago

@LayZeeDK where should I put options in nx.json? Currently not really proficient with it. Thanks!

{
  "$schema": "./node_modules/nx/schemas/nx-schema.json",
  "namedInputs": {
    "default": ["{projectRoot}/**/*", "sharedGlobals"],
    "production": [
      "default",
      "!{projectRoot}/.eslintrc.json",
      "!{projectRoot}/eslint.config.js",
      "!{projectRoot}/**/?(*.)+(spec|test).[jt]s?(x)?(.snap)",
      "!{projectRoot}/tsconfig.spec.json",
      "!{projectRoot}/jest.config.[jt]s",
      "!{projectRoot}/src/test-setup.[jt]s",
      "!{projectRoot}/test-setup.[jt]s"
    ],
    "sharedGlobals": []
  },
  "targetDefaults": {
    "@angular-devkit/build-angular:application": {
      "cache": true,
      "dependsOn": ["^build"],
      "inputs": ["production", "^production"]
    },
    "@nx/eslint:lint": {
      "cache": true,
      "inputs": [
        "default",
        "{workspaceRoot}/.eslintrc.json",
        "{workspaceRoot}/.eslintignore",
        "{workspaceRoot}/eslint.config.js"
      ]
    },
    "@nx/jest:jest": {
      "cache": true,
      "inputs": ["default", "^production", "{workspaceRoot}/jest.preset.js"],
      "options": {
        "passWithNoTests": true
      },
      "configurations": {
        "ci": {
          "ci": true,
          "codeCoverage": true
        }
      }
    }
  },
  "plugins": [
    {
      "plugin": "@nx/playwright/plugin",
      "options": {
        "targetName": "e2e"
      }
    },
    {
      "plugin": "@nx/eslint/plugin",
      "options": {
        "targetName": "lint"
      }
    }
  ],
  "generators": {
    "@nx/angular:application": {
      "e2eTestRunner": "playwright",
      "linter": "eslint",
      "style": "css",
      "unitTestRunner": "jest"
    }
  }
}
a88zach commented 3 months ago

@draylegend, look like your issue is different. You already have an options object in both plugins

 "plugins": [
    {
      "plugin": "@nx/playwright/plugin",
      "options": {
        "targetName": "e2e"
      }
    },
    {
      "plugin": "@nx/eslint/plugin",
      "options": {
        "targetName": "lint"
      }
    }
  ],
AgentEnder commented 2 months ago

Hey @draylegend 👋

Can you set the environment variable NX_VERBOSE_LOGGING=true and try a few commands to get a better stack trace?

Without more messaging here there are too many things it could be to dig into the issue report.

draylegend commented 2 months ago

just tried with nx@19.3.2 the following cmds

and it worked!

montella1507 commented 2 months ago

Had the same issue..

An error occurred while processing files for the @nx/eslint/plugin plugin.

github-actions[bot] commented 1 month ago

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.