Skip to content

CLI doesn't show an error when Edge Functions bundle size is above the limit  #2837

Description

@GageBachik

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

There seem to be some imports for npm that cause edge functions to fail when deployed even though they work fine locally.
The error spit back from logs is: worker boot error: failed to read path: No such file or directory (os error 2).

To Reproduce

Steps to reproduce the behavior, please provide code snippets or a repository:

  1. Simply run 'supabase functions new hello-world'
  2. Jump into index.ts and add: 'import { Helius } from "npm:helius-sdk";' to the top.
  3. Run supabase serve to see that it's all working locally.
  4. Run supabase deploy and hit the endpoint to get the aforementioned error.

Expected behavior

I would expect serve and deploy to both work fine or both fail.
I'm noticing this issue across multiple different npm package imports.

System information

  • OS: macOS
  • Browser: chrome
  • Version of supabase-cl: 1.165.0

Additional context

index.ts

import { Helius } from "npm:helius-sdk";
export const helius: Helius = new Helius("");

Deno.serve(async () => {
  const data = {
    message: `Helius: ${helius}`,
  };

  return new Response(JSON.stringify(data), {
    headers: { "Content-Type": "application/json" },
  });
});

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions