nx-console
nx-console copied to clipboard
Project Graph Application Error
Current Behavior
In IDE project graph fails to render in VS Code, returns error:
TypeError: Cannot read properties of undefined (reading 'projects')
Note: running the project graph in the browser via
nx graphstill works as expected
Expected Behavior
Project Graph should render within VS Code
Steps to Reproduce
Command Palette > Nx: Show full project graph
Failure Logs / Images / Videos
Environment
Nx Report
Node : 20.11.1
OS : linux-arm64
npm : 10.2.4
nx : 18.0.7
@nx/js : 18.0.7
@nx/jest : 18.0.7
@nx/linter : 18.0.7
@nx/eslint : 18.0.7
@nx/workspace : 18.0.7
@nx/cypress : 18.0.7
@nx/devkit : 18.0.7
@nx/eslint-plugin : 18.0.7
@nx/plugin : 18.0.7
@nx/react : 18.0.7
@nx/remix : 18.0.7
@nx/storybook : 18.0.7
@nrwl/tao : 18.0.7
@nx/vite : 18.0.7
@nx/web : 18.0.7
typescript : 5.3.3
---------------------------------------
Community plugins:
@nxlv/python : 18.0.0
- Nx Console version:
v18.17.0 - VSCode version:
1.87.2
Hi thanks for reporting this! could you provide some logs and ideally a minimal repro? That will make it easier for us to fix the issue.
- Go to
Output -> Nx Console Clientand paste what you see there. - Run
Toggle Developer Toolsand paste what you see there too - Finally, run
nx daemonand provide the contents of thedaemon.logfile linked there
Thank you!
Here you go @MaxKless !
Nx Console Client Log
[Nxls] - 2024-03-21T18:22:01.126Z - Using local Nx package at /home/vscode/workspace/node_modules/nx/src/utils/cache-directory.js
[Nxls] - 2024-03-21T18:22:01.138Z - Using local Nx package at /home/vscode/workspace/node_modules/nx/src/utils/cache-directory.js
[Nxls] - 2024-03-21T18:22:01.141Z - Generating graph with command: `npx nx graph --file ./.nx/cache/nx-console-project-graph/project-graph.html`
[Nxls] - 2024-03-21T18:22:03.317Z - Using local Nx package at /home/vscode/workspace/node_modules/nx/src/utils/cache-directory.js
[Nxls] - 2024-03-21T18:22:03.319Z - Generating graph with command: `npx nx graph --file ./.nx/cache/nx-console-project-graph/project-graph.html`
[Nxls] - 2024-03-21T18:22:05.079Z - Using local Nx package at /home/vscode/workspace/node_modules/nx/src/utils/cache-directory.js
Dev Tools Log
nx daemon log output (I captured this on a separate pass so the timestamps won't line up)
[NX Daemon Server] - 2024-03-21T21:30:31.780Z - Started listening on: /tmp/fdd2e125f081b6a16a65/d.sock
[NX Daemon Server] - 2024-03-21T21:30:31.860Z - [WATCHER]: Subscribed to changes within: /home/vscode/workspace (native)
[NX Daemon Server] - 2024-03-21T21:30:31.863Z - Established a connection. Number of open connections: 1
[NX Daemon Server] - 2024-03-21T21:30:31.869Z - Established a connection. Number of open connections: 2
[NX Daemon Server] - 2024-03-21T21:30:31.885Z - Closed a connection. Number of open connections: 1
[NX Daemon Server] - 2024-03-21T21:30:31.954Z - [REQUEST]: Client Request for Project Graph Received
[NX Daemon Server] - 2024-03-21T21:30:31.984Z - [REQUEST]: Updated workspace context based on watched changes, recomputing project graph...
[NX Daemon Server] - 2024-03-21T21:30:31.987Z - [REQUEST]:
[NX Daemon Server] - 2024-03-21T21:30:31.988Z - [REQUEST]:
[NX Daemon Server] - 2024-03-21T21:30:37.933Z - [REQUEST]: Responding to the client. project-graph
[NX Daemon Server] - 2024-03-21T21:30:37.939Z - Time taken for 'total for creating and serializing project graph' 5979.263461ms
[NX Daemon Server] - 2024-03-21T21:30:37.970Z - Done responding to the client project-graph
[NX Daemon Server] - 2024-03-21T21:30:37.972Z - Handled REQUEST_PROJECT_GRAPH. Handling time: 5979. Response time: 39.
[NX Daemon Server] - 2024-03-21T21:30:38.016Z - Established a connection. Number of open connections: 2
[NX Daemon Server] - 2024-03-21T21:35:23.457Z - Closed a connection. Number of open connections: 1
[NX Daemon Server] - 2024-03-21T21:35:23.569Z - Closed a connection. Number of open connections: 0
[NX Daemon Server] - 2024-03-21T21:43:49.243Z - Established a connection. Number of open connections: 1
[NX Daemon Server] - 2024-03-21T21:43:49.245Z - Closed a connection. Number of open connections: 0
Hey! This should be fixed in the latest version of nx console :) If you still see this error, please let me know and I'll reopen the issue and investigate again.
Thanks @MaxKless, haven't seen this since!