Skip to content

Invalid file path on startup for relative imported modules / files #148

@devidevio

Description

@devidevio

Bug report

  • I confirm this is a bug with Supabase, not with my own application.
  • I confirm I have searched the Docs, GitHub Discussions, and Discord.

Describe the bug

I'm running the supabase edge-runtime in a self hosted environment. Since the upgrade from supabase/edge-runtime:v1.5.2 to the latest available version supabase/edge-runtime:v1.7.2 I'm getting the following error on the container startup:

Failed to load module: "file:///home/deno/functions/_shared/headers.ts" - Invalid file path.
  Specifier: file:///home/deno/functions/_shared/headers.ts
CPU time used: 13ms
Error: worker boot error

The setup is exactly the same as described in the example here.

It works as expected on supabase/edge-runtime:v1.6.0.

I'm mounting the functions directory as described in the docker example file here.

volumes:
      - ./volumes/functions:/home/deno/functions:Z

It seems like there is a / (slash) to much (3 instead of 2) in the file path where it tries to load the file.

Expected behavior

The local file / module import works as expected.

Currently:
file:///home/deno/functions/_shared/headers.ts

Should be / correct:
file://home/deno/functions/_shared/headers.ts

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: something isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions