发布

  • fix(js): use explicit nx/bin/nx path in start-local-registry (#35127)

    frostbyte_neo 发布于 2026-04-01 16:29:47 +00:00

    Current Behavior

    start-local-registry.ts uses require.resolve('nx') to find the nx
    CLI binary for forking a child process. This resolves the package's
    main entry point, which only incidentally points to the binary. In
    pnpm strict mode, this resolution fails when called from within @nx/js
    because @nx/js doesn't declare nx as 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 the main field or pnpm hoisting behavior.

    (cherry picked from commit 49a0e3f69e)

    下载附件