Skip to content

Inferred tasks disappear from project graph view after changing nx.json #30699

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

Open
4 tasks
DanielGiljam opened this issue Apr 12, 2025 · 0 comments
Open
4 tasks

Comments

@DanielGiljam
Copy link

Current Behavior

If I open the project graph view for, e.g. nextjs-app (nx show project nextjs-app), then at first the inferred tasks show up there nicely.

But if I then go ahead an make some innocent changes to nx.json and hit save, the project graph view reloads, and the inferred tasks are gone.

After shutting down the project graph view (Ctrl+C) and starting it again, the inferred tasks show up again.

Expected Behavior

After making changes to nx.json, the inferred tasks should still be there after the project graph view has reloaded.

GitHub Repo

https://github.com/DanielGiljam/nx-nextjs-typecheck-target-missing-repro

Steps to Reproduce

  1. Run pnpm nx show project nextjs-app.
  2. See how when the project graph view has opened up in the web browser, the inferred tasks show up there.
  3. Make some change to nx.json, e.g.
    {
      "plugin": "@nx/js/typescript",
    - "options": {
    -   "typecheck": {
    -     "targetName": "typecheck"
    -   },
    -   "build": {
    -     "targetName": "build",
    -     "configName": "tsconfig.lib.json",
    -     "buildDepsName": "build-deps",
    -     "watchDepsName": "watch-deps"
    -   }
    - }
    }
  4. See the project graph view reload, and the inferred tasks now being gone.
  5. Shut down project graph view (Ctrl+C).
  6. Start project graph view again.
  7. See how when the project graph view has opened up in the web browser, the inferred tasks show up there again.

Nx Report

Node           : 23.11.0
OS             : darwin-arm64
Native Target  : aarch64-macos
pnpm           : 10.8.0

nx                     : 20.7.2
@nx/js                 : 20.7.2
@nx/jest               : 20.7.2
@nx/eslint             : 20.7.2
@nx/workspace          : 20.7.2
@nx/devkit             : 20.7.2
@nx/eslint-plugin      : 20.7.2
@nx/module-federation  : 20.7.2
@nx/next               : 20.7.2
@nx/playwright         : 20.7.2
@nx/react              : 20.7.2
@nx/web                : 20.7.2
@nx/webpack            : 20.7.2
typescript             : 5.7.3
---------------------------------------
Registered Plugins:
@nx/js/typescript
@nx/next/plugin
@nx/playwright/plugin
@nx/eslint/plugin
@nx/jest/plugin
---------------------------------------
Cache Usage: 0.00 B / 92.64 GB

Failure Logs

Package Manager Version

No response

Operating System

  • macOS
  • Linux
  • Windows
  • Other (Please specify)

Additional Information

Tested in an other repos as well which different kinds of apps/libraries. This affects other kinds of apps/libraries as well, not just Next.js apps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant