Automattic / Automattic/studio

Bug: WordPress Studio fails to start site with `spawn E2BIG`

Open
#4,083 0 comments 0 reactions 0 assignees View on GitHub
[Status] Auto-allocated Bug YOLO
Dominant language
TypeScript
Stars
517
Forks
95
Avg merge
1d 22h
Merged PRs (30d)
162

Description

### Quick summary

## Description

After installing project dependencies with `pnpm`, WordPress Studio is no longer able to start the site.

The startup process fails with the following error:

```text
CliCommandError: [Last error message] Failed to start WordPress server: spawn E2BIG
[Base message] Failed to start site
[Exit code] 1
```

```text
spawn E2BIG
```

## Possible cause

My project is a WordPress plugin that uses `pnpm`. After installing dependencies, the project contains a very large `node_modules` directory.

My suspicion is that WordPress Studio is attempting to process or pass too many file paths when starting the site, eventually hitting the operating system's argument size limit (`E2BIG` / `ARG_MAX`).

It might be worth excluding `node_modules` from any startup or synchronization process if it is currently being scanned or passed to a child process.

## Environment

- OS: linux mint
- Package manager: pnpm
- Project type: WordPress plugin

### Steps to reproduce

1. Create or open a WordPress plugin project in WordPress Studio.
2. Install the project dependencies using `pnpm install`.
3. Start the site from WordPress Studio.
4. The site fails to start with `spawn E2BIG`.

### What you expected to happen

The site should start normally regardless of the size of the project's `node_modules` directory.

### What actually happened

WordPress Studio fails to start the site and reports:

### Impact

All

### Available workarounds?

No but the app is still usable

### Platform

_No response_

### Logs or notes

```text
[2026-07-06T09:22:29.452Z][info][main] [CLI - cbe422a8-6225-4dc4-a0a3-434dd80c7c55] Iniciando daemon del proceso…
[2026-07-06T09:22:29.454Z][info][main] [CLI - cbe422a8-6225-4dc4-a0a3-434dd80c7c55] Cargando sitio…
[2026-07-06T09:22:29.455Z][info][main] [CLI - cbe422a8-6225-4dc4-a0a3-434dd80c7c55] Iniciando el servidor proxy HTTP…
[2026-07-06T09:22:29.457Z][info][main] [CLI - cbe422a8-6225-4dc4-a0a3-434dd80c7c55] Agregando dominio al archivo de hosts…
[2026-07-06T09:22:29.457Z][info][main] [CLI - cbe422a8-6225-4dc4-a0a3-434dd80c7c55] Configurando la integración con SQLite, si es necesario…
[2026-07-06T09:22:29.458Z][info][main] [CLI - cbe422a8-6225-4dc4-a0a3-434dd80c7c55] Iniciando el servidor de WordPress…
[2026-07-06T09:22:29.458Z][info][main] [CLI - cbe422a8-6225-4dc4-a0a3-434dd80c7c55] Checking PHP 8.3 binary…
[2026-07-06T09:22:29.460Z][info][main] [CLI - cbe422a8-6225-4dc4-a0a3-434dd80c7c55] Iniciando el servidor de WordPress…
[2026-07-06T09:22:29.870Z][erro][main] Error occurred in handler for 'startServer': CliCommandError: [Last error message] Error al iniciar el servidor de WordPress: spawn E2BIG
[Base message] Failed to start site
[Exit code] 1
```

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the failure with a WordPress plugin after running `pnpm install`, then trace the WordPress Studio startup path that produces `spawn E2BIG`. The work is done when the affected project starts successfully without hitting the operating system argument-size limit.

Written by the indexing model from the issue text.

Assessment

Tech stack
electron, typescript
Domain
desktop
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.