nx
nx copied to clipboard
[Windows] Failed to process project graph. Run "nx reset" to fix this. Please report the issue if you keep seeing it.
Current Behavior
When runing pnpm scripts like "pnpm nx run
NX Failed to process project graph. Run "nx reset" to fix this. Please report the issue if you keep seeing it.
Pass --verbose to see the stacktraces.
ELIFECYCLE Command failed with exit code 1.
Sometimes running "nx reset" will resolve the issue, but other times the .nx/workspace-data/d/daemon.log file will be locked by some process (node/vscode), and the "nx reset" command will fail with an exception.
I am reporting this issue as the nx CLI is suggesting that's the best path if the "nx reset" issue keeps reoccuring.
In any case, I have been able to resolve it manually by running "nx reset" and killing node/vscode processes manually if the daemon.log file is locked.
Please advise.
Expected Behavior
Would expect that I could rerun pnpm nx run
GitHub Repo
No response
Steps to Reproduce
- Use a windows machine
- Run pnpm nx run
- Intermittently experience failure message that indicates the project graph failed to process, and use "nx reset"
Nx Report
NX Report complete - copy this into the issue template
Node : 18.18.0
OS : win32-x64
Native Target : x86_64-windows
pnpm : 9.8.0
nx : 19.6.2
@nx/js : 19.6.2
@nx/linter : 19.6.2
@nx/eslint : 19.6.2
@nx/workspace : 19.6.2
@nx/devkit : 19.6.2
@nx/eslint-plugin : 19.6.2
@nx/next : 19.6.2
@nx/react : 19.6.2
@nrwl/tao : 19.6.2
@nx/web : 19.6.2
@nx/webpack : 19.6.2
typescript : 5.5.4
---------------------------------------
Registered Plugins:
@nx/next/plugin
Failure Logs
No response
Package Manager Version
pnpm 9.8.0
Operating System
- [ ] macOS
- [ ] Linux
- [X] Windows
- [ ] Other (Please specify)
Additional Information
No response
i have the same issue.
My current work around is for the nx reset thing is
rm -rf .nx
# most of the time this is not working ... some open file handles are present this can be resolved via
# Sometimes its the extension
taskkill.exe /IM code.exe /F
# sometimes zombie process -_-
taskkill.exe /IM node.exe /F
Ahh that's what is going on. Following as I'm having the same issue.
same issue for me run build the project, any ideas?
same issue here.
I experience the same on Windows, I have colleagues experiencing this also on Mac, so it may not be restricted only to a single OS.
I've experienced the same thing.
- Attempt to run an nx command such as removing an app
- Get told
Failed to process project graph. Run "nx reset" to fix this. Please report the issue if you keep seeing it. - Run
nx reset - Two things will happen
NX EPERM: operation not permitted, open 'C:\Users\USER\PATH\TO\FOLDER\root_app\.nx\workspace-data\d\daemon.log'NX Cleaning up temporary files created by Nx Cloud.
I have to completely kill VS Code to keep having to try again until it lets me run a command.
- nx: 19.6.5
- node: 20.9.0
- windows 11 OS
- vscode (latest) v1.93
- nx console extension v18.26.0
For me sometime i have to remove 'things' in the migrations.json file created by NX and it resolve the problem.
I can confirm that this is also very frequently showing up with Mac so it's not operating system related. Here is my report:
Node : 22.9.0
OS : darwin-arm64
Native Target : aarch64-macos
pnpm : 9.10.0
nx : 19.8.2
@nx/js : 19.8.2
@nx/jest : 19.8.2
@nx/linter : 19.8.2
@nx/eslint : 19.8.2
@nx/workspace : 19.8.2
@nx/cypress : 19.8.2
@nx/devkit : 19.8.2
@nx/esbuild : 19.8.2
@nx/eslint-plugin : 19.8.2
@nx/node : 19.8.2
@nx/playwright : 19.8.2
@nx/plugin : 19.8.2
@nx/react : 19.8.2
@nx/storybook : 19.8.2
@nrwl/tao : 19.8.2
@nx/vite : 19.8.2
@nx/web : 19.8.2
@nx/webpack : 19.8.2
typescript : 5.6.2
---------------------------------------
Registered Plugins:
@nx/eslint/plugin
@nx/vite/plugin
@nx/vite/plugin
---------------------------------------
Community plugins:
@nx-tools/nx-prisma : 6.1.0
@nxazure/func : 1.1.5
---------------------------------------
Hey! Are all of you using nx console? Is the behaviour different when using nx console vs not using it?
We had a similar issue to this regarding leftover plugin workers but it should be fixed on the latest nx version.
Were leftover workers seen as multiple node.exe processes under Windows?
yes exactly, more specifically those keeping daemon.log locked.
But not as vscode processes, actual orphaned node processes
Thanks, and yup I see A LOT of them sporadically.
I'll bump to 19.8.2+ this week and report back.
yes exactly, more specifically those keeping
daemon.loglocked.But not as vscode processes, actual orphaned node processes
I can confirm, once migrated to latest version of Nx, I'm not seeing this issue anymore.
Windows 11 with Nx console on Jetbrains.
Also make sure to kill all processes or restart the pc after an upgrade, they might be left over from a while back if they're orphaned.
In my case it was an error: The following implicitDependencies point to non-existent project(s): , which appears due to a directory being left after the branch switching. So if you work with a project that does not exist in a branch you going to switch on, the error presents on this branch
This error do also happen we you do not have a project.json file in any one of the application. (It could be worth having a better error)
We are experiencing this pretty heavily in our monorepo as well. Mixture of Mac and Windows, though appears to happen more with Windows. Typically just need to close vscode or wipe orphaned NodeJS processes.
Going to upgrade to latest v20.x and see if it helps us at all. I have removed the nx console recommendation though (we don't use it much anyways).
I'll close this for now, let me know if you still run into it on latest @zjkipping. I'd also be interested in your experience with Nx Console, any specific reasons you don't use it a lot? Any value you're hoping for that it's not giving you? Feel free to send me an email [email protected]
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.