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

target property 'dependsOn' hang on the execution #21965

Closed
1 of 4 tasks
x-etienne opened this issue Feb 23, 2024 · 1 comment · Fixed by #22294
Closed
1 of 4 tasks

target property 'dependsOn' hang on the execution #21965

x-etienne opened this issue Feb 23, 2024 · 1 comment · Fixed by #22294

Comments

@x-etienne
Copy link

Current Behavior

After update from 17.x to 18.x release when configure 'dependsOn' on my 'project.json' the tasks run go to block. With the 17.x release all that had work as well.

Expected Behavior

I would appreciate that the previous behaviour come back

GitHub Repo

No response

Steps to Reproduce

  1. Creating a simple "node" project, with 2 files: main.ts and worker.ts, for sake of simplicity expose something
  2. Configure the 'project.json' as
{
  "name": "dextr",
  "$schema": "../../node_modules/nx/schemas/project-schema.json",
  "sourceRoot": "apps/dextr/src",
  "projectType": "application",
  "targets": {
    "build-worker": {
      "executor": "@nx/esbuild:esbuild",
      "outputs": [ "{options.outputPath}" ],
      "defaultConfiguration": "production",
      "options": {
        "platform": "node",
        "outputPath": "dist/apps/dextr",
        "outputFileName": "worker",
        "format": [ "cjs" ],
        "bundle": true,
        "main": "apps/dextr/src/worker.ts",
        "tsConfig": "apps/dextr/tsconfig.app.json",
        "assets": [ "apps/dextr/src/assets" ],
        "generatePackageJson": false,
        "esbuildOptions": {
          "sourcemap": true,
          "outExtension": {
            ".js": ".js"
          }
        }
      },
      "configurations": {
        "development": { },
        "production": {
          "esbuildOptions": {
            "sourcemap": true,
            "outExtension": {
              ".js": ".js"
            }
          }
        }
      }
    },
    "build": {
      "executor": "@nx/esbuild:esbuild",
      "outputs": [ "{options.outputPath}" ],
      "defaultConfiguration": "production",
      "dependsOn": [ "build-worker" ],
      "options": {
        "platform": "node",
        "outputPath": "dist/apps/dextr",
        "format": [ "cjs" ],
        "bundle": false,
        "deleteOutputPath": false,
        "main": "apps/dextr/src/main.ts",
        "tsConfig": "apps/dextr/tsconfig.app.json",
        "assets": [ "apps/dextr/src/assets" ],
        "generatePackageJson": true,
        "esbuildOptions": {
          "sourcemap": true,
          "outExtension": {
            ".js": ".js"
          }
        }
      },
      "configurations": {
        "development": { },
        "production": {
          "esbuildOptions": {
            "sourcemap": false,
            "outExtension": {
              ".js": ".js"
            }
          }
        }
      }
    },
    "serve": {
      "executor": "@nx/js:node",
      "defaultConfiguration": "development",
      "options": {
        "buildTarget": "dextr:build",
        "runBuildTargetDependencies": true,
        "port": 9238
      },
      "configurations": {
        "development": {
          "buildTarget": "dextr:build:development"
        },
        "production": {
          "buildTarget": "dextr:build:production"
        }
      }
    }
  },
  "tags": [ ]
}
  1. run npx nx run dextr:build --skipNxCache true

Nx Report

Node   : 20.10.0
OS     : win32-x64
npm    : 10.2.5

nx                 : 18.0.4
@nx/js             : 18.0.4
@nx/jest           : 18.0.4
@nx/linter         : 18.0.4
@nx/eslint         : 18.0.4
@nx/workspace      : 18.0.4
@nx/devkit         : 18.0.4
@nx/esbuild        : 18.0.4
@nx/eslint-plugin  : 18.0.4
@nx/node           : 18.0.4
@nrwl/tao          : 18.0.4
typescript         : 5.3.3

Failure Logs

No response

Package Manager Version

10.2.5

Operating System

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

Additional Information

No response

Copy link

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 15, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants