Skip to content

run-gatsby.js fails on Windows when using pnpm/bun (missing gatsby.cmd) #8143

Open

Description

@tanav29

Description

The scripts/run-gatsby.js wrapper hardcodes gatsby.cmd as the Gatsby binary path on Windows. When dependencies are installed with pnpm or bun, only gatsby.exe / gatsby.bunx are created in node_modules/.bin/, causing the dev server to fail with:
'gatsby_modules.bin\gatsby.cmd' is not recognized as an internal or external command
Fix: Fall back through gatsby.cmd → gatsby.exe → gatsby.bunx on Windows.

Expected Behavior

  • for users using bun/pnpm the server should start normally for that not only search for gatsby.cmd but gatsby.exe and gatsby.bunx as fallback on windows

Screenshots

Image

Environment:

  • Host OS: Windows
  • Browser: Chrome

Contributor Resources and Handbook

The layer5.io website uses Gatsby, React, and GitHub Pages. Site content is found under the master branch.

Join the Layer5 Community by submitting your community member form.

Activity

  1. PARTH-TUSSLE commented on Sep 27, 2026

    @PARTH-TUSSLE
    Contributor

    Hey @tanav29 , you're on a different branch from the master , could you verify the issue exists against master as well ?

  2. tanav29 commented on Sep 27, 2026

    @tanav29
    ContributorAuthor

    @PARTH-TUSSLE yes it is not working on master branch too

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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions