solid-start icon indicating copy to clipboard operation
solid-start copied to clipboard

[Bug?]: bun create solid with basic template creates empty folders, except for .gitignore

Open TheWirv opened this issue 6 months ago • 4 comments

Duplicates

  • [x] I have searched the existing issues

Latest version

  • [x] I have tested the latest version

Current behavior 😯

When I execute bun create solid, with SolidStart, TypeScript: Yes, and Template: basic as options, the resulting scaffolded project consists of a .gitignore file, an empty public folder, and a src folder that itself consists of both an empty components and an empty routes folder.

Expected behavior 🤔

The template should be copied from the repo, including all files.

Steps to reproduce 🕹

Steps:

  1. bun create solid
  2. Project type: SolidStart
  3. TypeScript: Yes
  4. Template: basic

Context 🔦

I would like to create a new SolidStart project with bun.

Your environment 🌎

I asked AI to give me a command that would provide useful information, referencing the placeholder.

System:
OS: Microsoft Windows 11 Pro
Version: 10.0.26100
Architecture: AMD64

Binaries:
Bun: 1.2.19
Node: Not installed
npm: Not installed

Dependencies:
package.json not found

TheWirv avatar Aug 09 '25 12:08 TheWirv

Additional information:

  • Same goes for all other templates. Apparently, the script itself is not able to move the files from the template into the created project folder and subfolders.
  • I do have node on my machine, but it was not added to the PATH (intentionally). After "enabling" it, it worked, and the script created a complete project.

Hence, it seems like the create-solid script has a node dependency. That should be mentioned in the docs somewhere. Right on the front page (https://start.solidjs.com), we have a switcher that let's you pick a package manager, and the ability to choose bun here indicates to me that I can set up a Solid Start project with bun (on its own). The fact that that is not the case needs to be either fixed, or addressed otherwise.

TheWirv avatar Aug 10 '25 07:08 TheWirv

Hi! This is probably related to https://github.com/solidjs-community/solid-cli/issues/63. Bun aims to be a drop-in replacement for Node, so if something works with Node, but not with Bun, then I think that's a bug in Bun.

I also can't reproduce this on my own machine. Running bun create solid (with Bun version 1.2.19) results in a correctly scaffolded project.

Could there be something else that's breaking Bun with the CLI?

Tommypop2 avatar Aug 10 '25 11:08 Tommypop2

These two issues definitely seem related. And it's also not the first time I have had problems with project scaffolding using Bun alone. Your theory about this being an issue with Bun itself (emulating/replicating some Node package) also seems plausible to me.

The thing actually bugging me is that, whatever the problem is, that it somehow fails silently, and then the script just continues, as if nothing happened and everthing is fine. Maybe there should be some kind of improved error handling or something.

Is there a way to run a debug version of that script that outputs more verbose logging?

TheWirv avatar Aug 10 '25 18:08 TheWirv

+1 same thing happened to me. It failed silently

h2k1 avatar Nov 28 '25 04:11 h2k1