Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for Deno workspaces #3047

Open
maximilian-hammerl opened this issue Jan 15, 2025 · 0 comments
Open

Support for Deno workspaces #3047

maximilian-hammerl opened this issue Jan 15, 2025 · 0 comments
Labels
enhancement New feature or request

Comments

@maximilian-hammerl
Copy link

maximilian-hammerl commented Jan 15, 2025

Is your feature request related to a problem? Please describe.

I want to use Deno workspaces with my edge functions. I tried adding the supabase/functions directory as a workspace member and adjusting the supabase/functions/deno.json by adding "name" and "exports" and moving some tasks and imports to the root deno.json as well as adding the supabase/functions/edge-function-name directory as a workspace member and adjusting the supabase/functions/edge-function-name/deno.json.

With these changes I see the following error when trying to invoke any edge function:

worker boot error: failed to create the graph: Relative import path "other_workspace_member_name/some_file.ts" not prefixed with / or ./ or ../
    at file:///path/supabase/functions/edge-function-name/index.ts:6:32

Describe the solution you'd like

Support Deno workspaces (or if it is already supported, please document how it is supposed to be used).

Describe alternatives you've considered

For now I can "fake" it by adding the workspace members in the deno.json as imports such as:

{
  "imports": {
    ...
    "other_workspace_member_name/": "../path/to/workspace/member/",
    ...
  }
}

I am not sure whether this is a bug, as Deno workspaces are an existing feature which is not working, or a feature request, if Deno workspaces is missing/not yet implemented for the Supabase edge runtime.
Additionally, I was not sure whether to open this issue here in the CLI repository or in the edge runtime repository. I decided for the CLI repository, as we use the edge runtime through the CLI.

@sweatybridge sweatybridge added the enhancement New feature or request label Jan 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants