© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabase•3mo ago•
1 reply
jahbrewski

Cannot deploy Edge Function

edge functionsSolved
I've recently started seeing the following error for an Edge Function that used to work fine:
"worker boot error: Uncaught SyntaxError: The requested module 'https://esm.sh/contentful-management@11.41.0' does not provide an export named 'default'\n    at file:///var/tmp/sb-compile-edge-runtime/transactional/contentful.ts:1:8"
"worker boot error: Uncaught SyntaxError: The requested module 'https://esm.sh/contentful-management@11.41.0' does not provide an export named 'default'\n    at file:///var/tmp/sb-compile-edge-runtime/transactional/contentful.ts:1:8"


Here is the offending code:
import contentfulMgmt from "https://esm.sh/contentful-management@11.41.0";
export const SPACE_ID = Deno.env.get("CF_SPACE_ID");
export const ENVIRONMENT_ID = Deno.env.get("CF_ENVIRONMENT_ID");
const ACCESS_TOKEN = Deno.env.get("CF_ACCESS_TOKEN");
if (!SPACE_ID || !ENVIRONMENT_ID || !ACCESS_TOKEN) {
  throw new Error("Contentful configuration missing");
}
export const contentful = contentfulMgmt.createClient({
  accessToken: ACCESS_TOKEN
}, {
  type: "plain",
  defaults: {
    spaceId: SPACE_ID,
    environmentId: ENVIRONMENT_ID
  }
});
export function wrapFieldLocale(data) {
  return {
    "en-US": data
  };
}`
import contentfulMgmt from "https://esm.sh/contentful-management@11.41.0";
export const SPACE_ID = Deno.env.get("CF_SPACE_ID");
export const ENVIRONMENT_ID = Deno.env.get("CF_ENVIRONMENT_ID");
const ACCESS_TOKEN = Deno.env.get("CF_ACCESS_TOKEN");
if (!SPACE_ID || !ENVIRONMENT_ID || !ACCESS_TOKEN) {
  throw new Error("Contentful configuration missing");
}
export const contentful = contentfulMgmt.createClient({
  accessToken: ACCESS_TOKEN
}, {
  type: "plain",
  defaults: {
    spaceId: SPACE_ID,
    environmentId: ENVIRONMENT_ID
  }
});
export function wrapFieldLocale(data) {
  return {
    "en-US": data
  };
}`

What I've tried:
- Referencing npm directly in the import:
import contentfulMgmt from "npm:contentful-management@11.41.0";
import contentfulMgmt from "npm:contentful-management@11.41.0";

- Using a wildcard import:
import * as contentfulMgmt from "https://esm.sh/contentful-management@11.41.0";
import * as contentfulMgmt from "https://esm.sh/contentful-management@11.41.0";

- Deploying from the CLI with the --debug flag (When I tried this, it hangs at the following point:
Using access token for profile: supabase
Loading project ref from file: supabase/.temp/project-ref
Supabase CLI 2.62.5
Using profile: supabase (supabase.co) 
Using access token for profile: supabase
Loading project ref from file: supabase/.temp/project-ref
Supabase CLI 2.62.5
Using profile: supabase (supabase.co) 


I'm at my wits end as to what is going on! This same Edge Function was working yesterday just fine.
Supabase banner
SupabaseJoin
Supabase gives you the tools, documentation, and community that makes managing databases, authentication, and backend infrastructure a lot less overwhelming.
45,816Members
Resources
Was this page helpful?

Similar Threads

Recent Announcements

Similar Threads

Cannot deploy edge functions
SupabaseSSupabase / help-and-questions
7mo ago
Cannot deploy edge functions
SupabaseSSupabase / help-and-questions
3y ago
Cant deploy edge function
SupabaseSSupabase / help-and-questions
3y ago
Cannot download edge function
SupabaseSSupabase / help-and-questions
3y ago