-
fix(js): use explicit nx/bin/nx path in start-local-registry (#35127)
发布于
2026-04-01 16:29:47 +00:00 Current Behavior
start-local-registry.tsusesrequire.resolve('nx')to find the nx
CLI binary for forking a child process. This resolves the package's
mainentry point, which only incidentally points to the binary. In
pnpm strict mode, this resolution fails when called from within@nx/js
because@nx/jsdoesn't declarenxas a direct dependency.Expected Behavior
Use
require.resolve('nx/bin/nx')to explicitly resolve the CLI binary
entry point. This is semantically correct (the intent is to fork the nx
CLI) and doesn't rely on themainfield or pnpm hoisting behavior.(cherry picked from commit
49a0e3f69e)下载附件