`supabase start` fails on linked project
Describe the bug
When trying to run supabase start or supabase db start on a linked project the command fails with:
2024/07/04 16:04:35 Send Done
2024/07/04 16:04:35 Recv First Byte
node:internal/modules/cjs/loader:1148
throw err;
^
Error: Cannot find module '/app/dist/scripts/migrate-call.js'
at Module._resolveFilename (node:internal/modules/cjs/loader:1145:15)
at Module._load (node:internal/modules/cjs/loader:986:27)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:174:12)
at node:internal/main/run_main_module:28:49 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
Node.js v20.15.0
2024/07/04 16:04:35 Sent Header: Host [api.moby.localhost]
2024/07/04 16:04:35 Sent Header: User-Agent [Docker-Client/unknown-version (darwin)]
2024/07/04 16:04:35 Send Done
2024/07/04 16:04:35 Recv First Byte
To Reproduce Steps to reproduce the behavior:
- Run
supabase start-> starts successfully - Run
supabase stop - Run
supabase linkwith brand new project - Run
supabase start, orsupabase db start, and it will fail.
When linking the project I get the warning, although the config has been created with supabase init and not been altered or changed in any way.
Warning: Local config differs from linked project. Try updating supabase/config.toml
[api]
enabled = true
port = 54321
schemas = ["public", "graphql_public"]
extra_search_path = ["public", "extensions"]
max_rows = 1000
Expected behavior
For supabase start to work when a project is linked.
Screenshots If applicable, add screenshots to help explain your problem.
System information
Rerun the failing command with --create-ticket flag.
- Ticket ID: [e.g. ab1ac733e31e4f928a4d7c8402543712]
- Version of OS: [e.g. Ubuntu 22.04]
- Version of CLI: [e.g. v1.60.0]
- Version of Docker: [e.g. v25.0.3]
- Versions of services: [output from
supabase servicescommand]
SERVICE IMAGE │ LOCAL │ LINKED
supabase/postgres │ 15.1.1.73 │ 15.1.1.73
supabase/gotrue │ v2.154.2 │ v2.154.2
postgrest/postgrest │ v12.2.1 │ v12.2.1
supabase/realtime │ v2.28.32 │ -
supabase/storage-api │ v1.6.7 │ v1.6.7
supabase/edge-runtime │ v1.54.6 │ -
supabase/studio │ 20240422-5cf8f30 │ -
supabase/postgres-meta │ v0.80.0 │ -
supabase/logflare │ 1.4.0 │ -
supabase/supavisor │ 1.1.56 │ -
darthsim/imgproxy │ v3.8.0 │ -
Additional context If applicable, add any other context about the problem here.
- supabase 1.178.2 via npx
- Version of Node.js [e.g. v16.20.0] tried with 20.12.2 and 22.3.0
supabase/cli/internal/db/start/start.go
@fenos did we change the location of migrate script in recent storage version?
I'm having the same issue
The current workaround is to rm supabase/.temp/storage-version before supabase start. We will look into it more closely next week.
Thank you so much! I was going crazy over this
Thank you for looking into it. However, the workaround does not work for me. When I delete storage-version and run supabase start, I now get a different error:
Error response from daemon: failed to resolve reference "public.ecr.aws/supabase/postgrest:v12.2.1": public.ecr.aws/supabase/postgrest:v12.2.1: not found
I have the same issue when running supabase db diff. I've tried with v1.150.0 and v1.178.2. supabase start worked well though.
But thanks for this rm supabase/.temp/storage-version - fixed it for now 🎊
Thank you for looking into it. However, the workaround does not work for me. When I delete
storage-versionand runsupabase start, I now get a different error:Error response from daemon: failed to resolve reference "public.ecr.aws/supabase/postgrest:v12.2.1": public.ecr.aws/supabase/postgrest:v12.2.1: not found
This is due to a new postgrest release that we haven't mirrored to ECR. I've just completed the mirroring job so it should be resolved now. Could you try again?
@sweatybridge Thank you, the workaround is now working.
@sweatybridge
I am running supabase db diff command to create migrations Node js version : 18.17.0 Supabase cli version: Tried with 1.183.5 and also with beta version 1.186.2 docker version: 27.0.3
after running npx supabase start command I run npx supabase db diff
error diffing schema: error running container: exit 1: Traceback (most recent call last): File "/usr/local/bin/migra", line 8, in
could you please help me to fix this issue ??
@RishabhPachori could you please open a new issue as it's unrelated?
line 145, in alter_table_statement raise NotImplementedError
That problem is due to a limitation of migra tool which doesn't support generating alter rls statement.