Skip to content

v7.1.8 cannot be run as a spawned process while ignoring stdin #20884

Closed

Description

@kentcdodds

Describe the bug

Here's a video demo: https://www.loom.com/share/4979d2d7a3764944a954b9632c694bda

Basically, doing this causes vite to immediately exit as of v7.1.8:

import { spawn } from 'child_process';

const process = spawn('npx', ['vite'], {
	stdio: ['ignore', 'inherit', 'inherit'],
});

process.on('exit', (code, signal) => {
	console.log(`Process exited with code ${code} and signal ${signal}`);
});

My reproduction is a new vanilla vite project created today.

Reproduction

https://github.com/kentcdodds/spawn-vite

Steps to reproduce

git clone https://github.com/kentcdodds/spawn-vite.git
cd ./spawn-vite
npm install
node ./spawn.js

Notice it exits immediately. Then

npm i vite@7.1.7 --save-exact && node spawn.js

And it runs as expected

System Info

System:
    OS: macOS 15.6.1
    CPU: (16) arm64 Apple M4 Max
    Memory: 23.40 GB / 128.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 24.4.1 - ~/n/bin/node
    Yarn: 1.22.22 - ~/n/bin/yarn
    npm: 11.4.2 - ~/n/bin/npm
    pnpm: 10.18.0 - ~/n/bin/pnpm
    bun: 1.2.18 - /opt/homebrew/bin/bun
    Watchman: 2024.12.02.00 - /opt/homebrew/bin/watchman
  Browsers:
    Brave Browser: 140.1.82.173
    Chrome: 140.0.7339.214
    Safari: 18.6
  npmPackages:
    vite: 7.1.8 => 7.1.8

Used Package Manager

npm

Logs

No response

Validations

I believe the cause is probably something regarding #20837

Activity

  1. added theissue type on Oct 2, 2025
  2. kentcdodds commented on Oct 2, 2025

    @kentcdodds
    Author

    Possibly related to #20880

  3. ztolley commented on Oct 2, 2025

    @ztolley

    Just to add, potentially linked, 7.1.7 worked fine when used in conjunction with Tilt. When running 7.1.8 it simply appears to fail without error.

  4. locked and limited conversation to collaborators on Oct 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions