cli icon indicating copy to clipboard operation
cli copied to clipboard

`supabase init`: replace invalid chars in generated `project_id` with `_`

Open Yonatan-T opened this issue 3 years ago • 3 comments

Bug report

Error on 'supabase start'

trying to follow the instuctions on local devlopment as writtenin the docs https://supabase.com/docs/guides/functions#developing-locally

when running supabase start its pulls several images then i get a error: Error: Error response from daemon: Invalid container name (supabase_db_functions demo), only [a-zA-Z0-9][a-zA-Z0-9_.-] are allowed

and when i try running supabase functions serve hello-world i get get (obviously..) another error : Error: supabase start is not running.

running in windows 10 with docker installed

Yonatan-T avatar Sep 28 '22 23:09 Yonatan-T

Sorry about that - can set project_id in supabase/config.toml to e.g. functions_demo?

soedirgo avatar Sep 29 '22 05:09 soedirgo

Sorry about that - can set project_id in supabase/config.toml to e.g. functions_demo?

indeed , i updated the project_id in supabase/config.toml to the project id ( it was initialy set to the directory name) now everything is working properly

Thank you.

Yonatan-T avatar Sep 29 '22 07:09 Yonatan-T

Sorry, I'm repurposing this issue to fix the generated project_id if you don't mind! Feel free to unsubscribe.

soedirgo avatar Sep 29 '22 07:09 soedirgo

Currently, the Local Development documentation guides the user to run init and start consecutively. However, this causes the following error.

Error: Error response from daemon: Invalid container name (supabase_db_@), only [a-zA-Z0-9][a-zA-Z0-9_.-] are allowed

This is because supabase init generates a config.toml file with project_id = "@".

Adding steps to edit the config.toml file would help.

hyunbinseo avatar Apr 20 '23 01:04 hyunbinseo