Skip to content

bun create ./MyComponent.jsx fails on Windows with ENOENT #25352

@arshadjama1

Description

@arshadjama1

What version of Bun is running?

1.3.3+274e01c73

What platform is your computer?

Microsoft Windows NT 10.0.26200.0 x64

What steps can reproduce the bug?

  1. Create a simple React component named MyComponent.jsx:
    export default function MyComponent() { return <div>Hello</div>; }

  2. In PowerShell on Windows 11, run:
    bun create ./MyComponent.jsx

  3. Bun throws an ENOENT error and fails to create the build file.

What is the expected behavior?

bun create ./MyComponent.jsx should turn this existing React component into a complete dev environment with hot reload and production builds in one command as described in the docs:
https://bun.com/docs/runtime/templating/create#from-a-react-component

Image

What do you see instead?

Actual output:
ENOENT: No such file or directory: failed to create ../C:\Users\arsha\Desktop\learning\bun\MyComponent.build.ts (open)

Image

Additional information

  • The issue is reproducible across all environments on my Windows 11 machine, not only PowerShell.
  • I tested the same bun create ./MyComponent.jsx command in:
    • PowerShell
    • WSL (Ubuntu)
    • Git Bash (mingw64)
  • All of them throw the same error.
    ENOENT: No such file or directory: failed to create ../C:\Users\arsha\Desktop\learning\bun\MyComponent.build.ts (open)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions