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

dev fails when the path to the project has a directory with spaces in its name

Open ivoilic opened this issue 3 years ago • 2 comments

Setup a new project using the start and the first dev run errored out because a parent directory had spaces in its name:

✘ [ERROR] Could not resolve "/Users/user/hello"

failed to load config from /Users/user/hello
error when starting dev server:
Error: Build failed with 1 error:
error: Could not resolve "/Users/user/hello"

The path should be /Users/user/hello world/project

ivoilic avatar Nov 13 '22 23:11 ivoilic

Setup a new project using the start and the first dev run errored out because a parent directory had spaces in its name:

✘ [ERROR] Could not resolve "/Users/user/hello"

failed to load config from /Users/user/hello
error when starting dev server:
Error: Build failed with 1 error:
error: Could not resolve "/Users/user/hello"

The path should be /Users/user/hello world/project

I'm not sure this is a bug or not, but naming a folder with space and place project folder in C Drive, both have never been best practices, and people always try to avoid doing those.

My advices:

  1. Use dash - or underscore _ instead of space, or just don't separate characters at all and capitalized 1st character of each word instead. Not just solid, there are significant amount of packages that expected you not to put space in folder's name. So in the end even if solid team resolve this (which I doubt they would anytime soon), you shouldn't do it in the future.

  2. Place your project in D Drive or E Drive, in a folder named workspace or projects, like D:/workspace or E:/workspace. JavaScript project has tendencies to pollute your diskspace with it's huge node_modules folders, so you better put them there.

Senbonzakura1234 avatar Nov 15 '22 03:11 Senbonzakura1234

Yes, obviously this is bad practice and of course I moved my project to a different folder. It's an edge case but still a bug.

ivoilic avatar Nov 15 '22 05:11 ivoilic

Many cloud providers and iCloud (the one I use) and gDrive defaults with folders with spaces in them. While I am unsure of how google handles file names on the OS, for apple, renaming the iCloud folder will result in iCloud Drive functionality to stop working. The reason why I place some projects inside iCloud is for projects that I don't put on Github (or any other git providers) but still want a remote copy of for backup.
I'm pretty sure this is an issue with some dependency with solid start as I've seen the same error on some React Native (non expo) projects. But this is a annoying issue :(

kevintyj avatar Dec 17 '22 12:12 kevintyj

Duplicate of #401

ryansolid avatar Dec 21 '22 22:12 ryansolid