Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Project Graph Application Error #2060

Closed
kylebjordahl opened this issue Mar 18, 2024 · 3 comments
Closed

Project Graph Application Error #2060

kylebjordahl opened this issue Mar 18, 2024 · 3 comments
Labels
type: bug Something isn't working

Comments

@kylebjordahl
Copy link

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 graph still 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

Screenshot 2024-03-18 at 10 35 35 AM

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
@kylebjordahl kylebjordahl added the type: bug Something isn't working label Mar 18, 2024
@MaxKless
Copy link
Collaborator

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 Client and paste what you see there.
  • Run Toggle Developer Tools and paste what you see there too
  • Finally, run nx daemon and provide the contents of the daemon.log file linked there

Thank you!

@kylebjordahl
Copy link
Author

kylebjordahl commented Mar 21, 2024

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

vscode-app-1711045399451.log

Screenshot 2024-03-21 at 11 24 00 AM

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

@MaxKless
Copy link
Collaborator

MaxKless commented May 7, 2024

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.

@MaxKless MaxKless closed this as completed May 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants