solid-start
solid-start copied to clipboard
dev fails when the path to the project has a directory with spaces in its name
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
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:
-
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. -
Place your project in D Drive or E Drive, in a folder named
workspaceorprojects, likeD:/workspaceorE:/workspace. JavaScript project has tendencies to pollute your diskspace with it's hugenode_modulesfolders, so you better put them there.
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.
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 :(
Duplicate of #401