SupabaseS
Supabase•5mo ago
Juan

Error Edge Functoins

I get the following error: Entrypoint path does not exist - /tmp/user_fn_ofmmnwuobekwneblkcdv_76afd757-9a1a-4964-a0cc-f5163c726acc_1/source/index.ts

It happens when I try to deploy my edge function, do you know what the reason would be?

code:
  const zipCheck = new AdmZip(ZIP_PATH);
  console.log(ZIP_PATH, 'creado correctamente');
  console.log('📦 Contenido del ZIP:', zipCheck.getEntries().map(e => e.entryName));

  // Metadata
  const METADATA = {
    name: FUNCTION_NAME,
    entrypoint_path: 'index.ts', // <- probar así primero
    verify_jwt: false,
    import_map_path: 'deno.json',
    static_patterns: [],
  };

  // Enviar a Supabase
  const form = new FormData();
  form.append('metadata', JSON.stringify(METADATA), { contentType: 'application/json' });
  form.append('file', fs.createReadStream(ZIP_PATH), {
    filename: 'function.zip',
    contentType: 'application/zip',
  });

  const response = await axios.post(
    `https://api.supabase.com/v1/projects/${PROJECT_REF}/functions/deploy`,
    form,
    {
      headers: {
        ...form.getHeaders(),
        Authorization: `Bearer ${ACCESS_TOKEN}`,
        Accept: 'application/json',
      },
    }
  );
Was this page helpful?