Skip to content

startPtySession fails on Windows for .cmd shims #463

Closed

Description

@huang-julien

env

Operating system Windows 10.0.26200
Node.js version v24.21.0
nuxt/cli version 4.0.1
Package manager pnpm@unknown
Nuxt version 4.6.2
Nitro version 2.13.5
Builder vite@8.3.5
Config compatibilityDate, devtools
Modules -

descipriton

DevframeTerminalsHost.startPtySession() passes executeOptions.command as-is to the ConPTY spawn. On Windows, pnpm, npx and yarn are .cmd shims, which ConPTY can't run directly, so the session fails with DF8203. After that failure the process stops responding and nitro even hangs

startChildProcess() doesn't have this problem because tinyexec wraps shims in cmd.exe /d /s /c on win32.

As far as i remember, we've had this issue in the past with either nuxt devtools or nuxt cli

reproduction

https://github.com/huang-julien/devframe-pty-cmd-shim

git clone https://github.com/huang-julien/devframe-pty-cmd-shim
cd devframe-pty-cmd-shim
pnpm install

# Plain Node
pnpm repro:hub        # startPtySession({ command: 'pnpm', args: ['--version'] })
pnpm repro:hub-cmd    # same command wrapped in cmd.exe /d /s /c (works)

# Inside nuxt dev
pnpm dev --port 3457
node scripts/trigger.mjs pnpm http://localhost:3457   # in a second terminal

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions