nx icon indicating copy to clipboard operation
nx copied to clipboard

Failed to process project graph

Open draylegend opened this issue 1 year ago • 5 comments

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

  • npx create-nx-workspace nx-bun-bug --preset apps --pm bun
  • nx report

Nx Report

`nx report` doesn't work

Failure Logs

No response

Package Manager Version

bun v1.1.15

Operating System

  • [ ] macOS
  • [X] Linux
  • [ ] Windows
  • [ ] Other (Please specify)

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

draylegend avatar Jun 21 '24 18:06 draylegend

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.

LayZeeDK avatar Jun 23 '24 21:06 LayZeeDK

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

draylegend avatar Jun 27 '24 16:06 draylegend

@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

a88zach avatar Jun 27 '24 16:06 a88zach

@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"
    }
  }
}

draylegend avatar Jun 27 '24 16:06 draylegend

@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"
      }
    }
  ],

a88zach avatar Jun 27 '24 16:06 a88zach

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.

AgentEnder avatar Jul 08 '24 16:07 AgentEnder

just tried with [email protected] the following cmds

  • bunx create-nx-workspace my-project --preset apps --nxCloud skip
  • nx add @nx/angular
  • nx g @nx/angular:application client
  • nx show project client --web

and it worked!

draylegend avatar Jul 11 '24 08:07 draylegend

Had the same issue..

An error occurred while processing files for the @nx/eslint/plugin plugin. - apps/portal/.eslintrc.json: Failed to load config "../../.eslintrc.json" to extend from. looks like nx did not generate root .eslint.json file

montella1507 avatar Jul 22 '24 16:07 montella1507

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[bot] avatar Aug 24 '24 00:08 github-actions[bot]