question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

nx dep-graph not generating graph

See original GitHub issue

Current Behavior

The graph is served to http://127.0.0.1:4211, but no graph is visible.

Expected Behavior

nx dep-graph should generate or use the files it needs in order to display the dependency graph

Steps to Reproduce

  1. npx nx create-nx-workspace deps-repro
  2. Answer prompts:
    √ What to create in the new workspace · angular
    √ Application name                    · admin
    √ Default stylesheet format           · scss
    √ Use Nx Cloud? (It's free and doesn't require registration.) · No
    
  3. cd deps-repro
  4. ng generate @nrwl/angular:library --name=test-lib
  5. Add import { TestLibModule } from '@deps-repro/test-lib' to app.module.ts
  6. nx dep-graph

Repo that reproduces error: https://github.com/djbreen7/deps-repro

Failure Logs

Browser Console Errors:

Failed to load resource: the server responded with a status of 404 (Not Found)
Uncaught (in promise) SyntaxError: Unexpected token F in JSON at position 0

Browser Network Errors:

File C:\code\deps-repro\node_modules\@nrwl\workspace\src\core\dep-graph\projectGraph.json not found!

Environment

  Node : 14.16.1
  OS   : win32 x64
  npm  : 6.14.12

  nx : Not Found
  @nrwl/angular : 12.5.7
  @nrwl/cli : 12.5.7
  @nrwl/cypress : 12.5.7
  @nrwl/devkit : 12.5.7
  @nrwl/eslint-plugin-nx : 12.5.7
  @nrwl/express : Not Found
  @nrwl/jest : 12.5.7
  @nrwl/linter : 12.5.7
  @nrwl/nest : Not Found
  @nrwl/next : Not Found
  @nrwl/node : Not Found
  @nrwl/react : Not Found
  @nrwl/schematics : Not Found
  @nrwl/tao : 12.5.7
  @nrwl/web : Not Found
  @nrwl/workspace : 12.5.7
  @nrwl/storybook : 12.5.7
  @nrwl/gatsby : Not Found
  typescript : 4.2.4

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:6
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
djbreen7commented, Jul 9, 2021

Opened that PR ☝️ with path.basename() instead of regex. Not sure what vercel’s deal is, but hopefully someone will let me know if there’s an issue. Otherwise, all the tests are passing.

0reactions
djbreen7commented, Jul 8, 2021

@Poccomaxazt sounds like a job for path. I’ll take a closer look.

Read more comments on GitHub >

github_iconTop Results From Across the Web

nx dep-graph not showing any relations - Stack Overflow
I have the same problem. A temporary solution I found is to open all modules where you import anything from as a typescript...
Read more >
graph - CLI command | Nx
nx graph --file=output.json. Generate a static website with project graph into an html file, accompanied by an asset folder called static:.
Read more >
nx affected:dep-graph - Fig.io
nx affected:dep-graph. No description ... --files <arg>, Change the way Nx is calculating the affected command by providing directly changed files, ...
Read more >
Plugging into the Dependency Graph Construction for Nx
Nx now provides an API to extend the project graph to add nodes and dependencies for projects not built with TypeScript or JavaScript....
Read more >
Fixing Nrwl Nx Monorepo Workspace Dependency Graph Error
Next Nx will compare all of the enforcement rules defined inside the tslint.json file. If Nx could not find any rule against a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found