Skip to content

[Dev Environment] pnpm dev fails with ERR_PNPM_RECURSIVE_RUN_FIRST_FAIL on root #3808

@sky-private

Description

@sky-private

Bug report

When running pnpm dev to start Storybook for contributing, the command fails with ERR_PNPM_RECURSIVE_RUN_FIRST_FAIL.

Current Behavior

<PRIMITIVES_ROOT>/node_modules/.pnpm/[email protected]_@[email protected][email protected][email protected]_@[email protected][email protected]_/node_modules/storybook/bin/index.cjs:23
  throw error;
  ^

Error: spawn none ENOENT
    at ChildProcess._handle.onexit (node:internal/child_process:285:19)
    at onErrorNT (node:internal/child_process:483:16)
    at process.processTicksAndRejections (node:internal/process/task_queues:90:21)
Emitted 'error' event on ChildProcess instance at:
    at ChildProcess._handle.onexit (node:internal/child_process:291:12)
    at onErrorNT (node:internal/child_process:483:16)
    at process.processTicksAndRejections (node:internal/process/task_queues:90:21) {
  errno: -2,
  code: 'ENOENT',
  syscall: 'spawn none',
  path: 'none',
  spawnargs: [ 'http://localhost:6006/' ]
}

Node.js v22.18.0
<PRIMITIVES_ROOT>/apps/storybook:
 ERR_PNPM_RECURSIVE_RUN_FIRST_FAIL  @repo/[email protected] dev: `storybook dev -p 6006 -- -p 9009`
Exit status 7

Expected behavior

Storybook should start successfully.

Suggested solution

This issue appears to be a bug in Storybook, which might be fixed in v10.3.0-alpha.3. However, since that version is still in alpha, I suggest a workaround.
ref. storybookjs/storybook#33730

We can use --no-open option for storybook dev instead of BROWSER=none at package.json.
ref. https://storybook.js.org/docs/api/cli-options#dev

Your environment

Software Name(s) Version
Node n/a 22.18.0
npm/yarn/pnpm pnpm 9.15.9
Operating System Ubuntu (WSL2) 24.04.1 LTS
Shell Bash 5.3.9

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