Skip to content

static_files: bundle silently omits files when Docker daemon is not running (no warning, no error) #5169

@Sumberss

Description

@Sumberss

Describe the bug
Hi,

I used a edge function to import html files to build emails.
Since I updated my CLI to 2.90.0, my html files are not imported in my edge function anymore.

how I did in my config.toml

[functions.send-auth-email]` verify_jwt = false static_files = ["./functions/send-auth-email/templates/*.html"] my path : supabase/functions/send-auth-email/templates/[my html files]

in my index.ts:

const rawHtml = await Deno.readTextFile( new URL(./templates/${localTemplate.file}, import.meta.url), );

I think there is an issue with the CLI, silently failing without warning the user that is will not bundle templates when docker is not running on the machine

discussion

issue related

To Reproduce
Steps to reproduce the behavior:

  1. Go to an edge action on your codebase eg :send-auth-email
  2. create a folder "templates" and put html file in it
    setup config.toml to accept static_files for example:
    [functions.send-auth-email]
    static_files = ["./functions/send-auth-email/templates/*.html"]
  3. read these html files with DENO in your index.ts like that : const rawHtml = await Deno.readTextFile( new URL(./templates/${localTemplate.file}, import.meta.url), );
    call supabase functions deploy [your function]

Expected behavior
Supabase edge function is bundled with html templates and you see them on your the dashboard or a throw error

System information

  • OS: macOS
  • Version of supabase-js: 2.98.0
  • Version of Node.js: 24.14.1

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions