supabase / cli

Supabase CLI. Manage postgres migrations, run Supabase locally, deploy edge functions. Postgres backups. Generating types from your database schema.
https://supabase.com/docs/reference/cli/about
MIT License
1.09k stars 212 forks source link

[MacOS] supabase start - mkdir /Users: operation not permitted #1448

Closed andreafdaf closed 7 months ago

andreafdaf commented 1 year ago

Describe the bug When trying to run supabase start or npx supabase start or sudo supabase start on a fresh project I keep getting the same error:

Error response from daemon: make cli opts(): making volume mountpoint for volume /Users/me/workspace/project/supabase/functions: mkdir /Users: operation not permitted

Running with --debug flag yields no useful infos. Running supabase start -x edge-runtime works fine

To Reproduce Steps to reproduce the behavior:

mkdir test
cd test
npm init
npm i -D supabase
npx supabase init
npx supabase start

Expected behavior It should work.

Desktop (please complete the following information):

sweatybridge commented 1 year ago

Could you try creating this directory yourself before supabase start?

mkdir -p /Users/me/workspace/project/supabase/functions

There might be some permission settings for your /Users directory that prevents the binary from making changes.

andreafdaf commented 1 year ago

Hi! The directory already exists.

sweatybridge commented 1 year ago

Does it throw any error if you volume mount manually via docker cli?

docker run --rm -v /Users/me/workspace/project/supabase/functions:/tmp -it supabase/edge-runtime:v1.22.4
NiklasPor commented 11 months ago

Just wanted to move from my windows machine to a new mac and now also stuck on this error 👍 @andreafdaf did you manage to resolve it somehow?

andreafdaf commented 11 months ago

@NiklasPor I solved starting over with my env but since I did it in a hurry I lost some work so please do it with ease, doing backups and double checking every step you take.

From what I understood it was some kind of conflict between Podman and Docker. So what I did was purging everything from my Podman and Docker installs, starting over with only Docker installed and the issue went away.

If unlike in my case you don't have Podman installed alongside Docker then I don't know what to advise you.

Hope this helps you out!

NiklasPor commented 11 months ago

Thanks for the quick answer! interesting, is just started with a clean installed MacBook — we'll see 👀

sweatybridge commented 7 months ago

Closing due to staleness. If this error still persists, perhaps it's worth updating docker desktop to latest version 4.29.