cli icon indicating copy to clipboard operation
cli copied to clipboard

Supabase functions do not respect entrypoint in sub folder.

Open Kilowhisky opened this issue 8 months ago • 1 comments

Describe the bug If you create a function and put it in a folder and update the entrypoint in config.toml its path is not respected.

To Reproduce Steps to reproduce the behavior:

  1. npx supabase functions new public_my-function
  2. move functions/public_my-function/index.ts to functions/public/my-function/index.ts
  3. Update config.toml to new entrypoint = "functions/public/my-function/index.ts"
  4. npx supabase functions deploy public_my-function

Expected behavior I expect it to read the entrypoint path and load the entrypoint from there.

Screenshots

Using workdir /Users/me/Documents/Projects/x-supabase
Supabase CLI 2.24.3
WARNING: Functions using fallback import map: public_map-search_get-mvt
Please use recommended per function dependency declaration  https://supabase.com/docs/guides/functions/import-maps
2025/06/07 08:03:13 HTTP GET: https://api.supabase.com/v1/projects/gyaftaczfhgxjmomwnwz/functions
Bundling Function: public_map-search_get-mvt
WARN: failed to read file: open /Users/me/Documents/Projects/x-supabase/supabase/functions/public_map-search_get-mvt/index.ts: no such file or directory
Error: entrypoint path does not exist (supabase/functions/public_map-search_get-mvt/index.ts)
error running container: exit 1
Sent crash report: c4f2228e6bc64676a5b104fbfed78ac6

System information Rerun the failing command with --create-ticket flag.

  • Ticket ID: [c4f2228e6bc64676a5b104fbfed78ac6]
  • Version of OS: [OSX 15.5]
  • Version of CLI: [2.24.3]
  • Version of Docker: [Docker version 28.1.1, build 4eba377]
  • Versions of services:
WARNING: You are running different service versions locally than your linked project:
supabase/gotrue:v2.170.0 => v2.174.0
Run supabase link to update them.

 
  SERVICE IMAGE          | LOCAL                  | LINKED     
 ------------------------|------------------------|------------
  supabase/postgres      | 15.8.1.021             | 15.8.1.021 
  supabase/gotrue        | v2.170.0               | v2.174.0   
  postgrest/postgrest    | v12.2.3                | v12.2.3    
  supabase/realtime      | v2.36.7                | -          
  supabase/storage-api   | v1.23.0                | -          
  supabase/edge-runtime  | v1.67.4                | -          
  supabase/studio        | 2025.06.02-sha-8f2993d | -          
  supabase/postgres-meta | v0.89.3                | -          
  supabase/logflare      | 1.12.0                 | -          
  supabase/supavisor     | 2.5.1                  | -          

Kilowhisky avatar Jun 07 '25 15:06 Kilowhisky

I encountered the same error. I resolved this issue by executing the deploy command without specifying the function name npx supabase functions deploy

Ramzil11 avatar Jun 23 '25 11:06 Ramzil11