Open
Description
Current Behavior
After upgrading to NX 21, my local executor which was previously run from the built artifacts ./dist/src/index.js
as specified in executor.json
now gets run from its sources (./src/index.ts
) despite executor.json
still pointing to the build output.
The typescript is also getting transpiled with (what I assume) "module": "commonjs"
which turns await import
statements into require
. This effectively makes importing ESM dependencies from an executor impossible (apart from some ugly workarounds).
Changing the "module"
setting in the local tsconfig.json
had no effect on how NX transpiles the executor source.
Expected Behavior
NX should continue running the executor from the built sources as specified in executor.json
.
GitHub Repo
Steps to Reproduce
pnpm install
pnpm -w nx run-many --target build
Nx Report
Node : 20.12.1
OS : darwin-arm64
Native Target : aarch64-macos
pnpm : 9.11.0
nx : 21.2.1
@nx/js : 21.2.1
@nx/linter : 19.8.4
@nx/eslint : 19.8.4
@nx/workspace : 21.2.1
@nx/cypress : 21.2.1
@nx/devkit : 21.2.1
@nx/eslint-plugin : 21.2.1
@nx/playwright : 21.2.1
@nx/storybook : 21.2.1
@nx/vite : 21.2.1
@nx/web : 21.2.1
@nx/webpack : 19.7.2
typescript : 5.8.3
---------------------------------------
Community plugins:
@dxos/esbuild : 0.8.2
@dxos/nx-protobuf-compiler : 0.8.2
---------------------------------------
Local workspace plugins:
@dxos/nx-protobuf-compiler
@dxos/esbuild
---------------------------------------
Cache Usage: 133.84 MB / 92.64 GB
---------------------------------------
The following packages should match the installed version of nx
- @nx/linter@19.8.4
- @nx/eslint@19.8.4
- @nx/webpack@19.7.2
To fix this, run `nx migrate nx@21.2.1`
Failure Logs
Package Manager Version
No response
Operating System
- macOS
- Linux
- Windows
- Other (Please specify)
Additional Information
No response