ยฉ 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabaseโ€ข3y agoโ€ข
1 reply
Darren

Import Map Issues (relative path) for supabase package for functions deploy

I use edge functions a lot for my app and up until this morning I haven't had any issues with calling
supabase functions deploy <function-name>
supabase functions deploy <function-name>
. Yesterday I deployed multiple different EFs with no problems.

Today, I ran into an error:
Bundling test-endpoint
Error: Error bundling function: exit status 1
file:///src/import_map.json
file:///src/index.ts
error: Uncaught (in promise) Error: Relative import path "events" not prefixed with / or ./ or ../ and not in import map from "https://esm.sh/v135/@types/node@18.16.19/events.d.ts"
      const ret = new Error(getStringFromWasm0(arg0, arg1));
                  ^
    at __wbg_new_8d2af00bc1e329ee (https://deno.land/x/eszip@v0.30.0/eszip_wasm.generated.js:312:19)
    at <anonymous> (https://deno.land/x/eszip@v0.30.0/eszip_wasm_bg.wasm:1:79439)
    at <anonymous> (https://deno.land/x/eszip@v0.30.0/eszip_wasm_bg.wasm:1:1388039)
    at <anonymous> (https://deno.land/x/eszip@v0.30.0/eszip_wasm_bg.wasm:1:1862894)
    at __wbg_adapter_18 (https://deno.land/x/eszip@v0.30.0/eszip_wasm.generated.js:146:6)
    at real (https://deno.land/x/eszip@v0.30.0/eszip_wasm.generated.js:130:14)

Try rerunning the command with --debug to troubleshoot the error.
Bundling test-endpoint
Error: Error bundling function: exit status 1
file:///src/import_map.json
file:///src/index.ts
error: Uncaught (in promise) Error: Relative import path "events" not prefixed with / or ./ or ../ and not in import map from "https://esm.sh/v135/@types/node@18.16.19/events.d.ts"
      const ret = new Error(getStringFromWasm0(arg0, arg1));
                  ^
    at __wbg_new_8d2af00bc1e329ee (https://deno.land/x/eszip@v0.30.0/eszip_wasm.generated.js:312:19)
    at <anonymous> (https://deno.land/x/eszip@v0.30.0/eszip_wasm_bg.wasm:1:79439)
    at <anonymous> (https://deno.land/x/eszip@v0.30.0/eszip_wasm_bg.wasm:1:1388039)
    at <anonymous> (https://deno.land/x/eszip@v0.30.0/eszip_wasm_bg.wasm:1:1862894)
    at __wbg_adapter_18 (https://deno.land/x/eszip@v0.30.0/eszip_wasm.generated.js:146:6)
    at real (https://deno.land/x/eszip@v0.30.0/eszip_wasm.generated.js:130:14)

Try rerunning the command with --debug to troubleshoot the error.


I was able to determine this was happening when I imported the supabase package with a hello world EF
import { serve } from "https://deno.land/std@0.168.0/http/server.ts"
import { createClient } from 'https://esm.sh/@supabase/supabase-js@2' // IF YOU COMMENT THIS OUT, `supabase functions deploy` WORKS

console.log("Hello from Functions!")

serve(async (req) => {
  return new Response(
    JSON.stringify({hello : 'world'}),
    { headers: { "Content-Type": "application/json; charset=utf-8" } },
  )
})
import { serve } from "https://deno.land/std@0.168.0/http/server.ts"
import { createClient } from 'https://esm.sh/@supabase/supabase-js@2' // IF YOU COMMENT THIS OUT, `supabase functions deploy` WORKS

console.log("Hello from Functions!")

serve(async (req) => {
  return new Response(
    JSON.stringify({hello : 'world'}),
    { headers: { "Content-Type": "application/json; charset=utf-8" } },
  )
})


If I don't import the supabase package, the deploy runs just fine. Did something change recently with how imports work? I've never had to mess with the import map directly before because I don't import 3rd party libraries yet.
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

Suddenly always getting relative import path error when deploying functions
SupabaseSSupabase / help-and-questions
7d ago
supabase functions deploy via script
SupabaseSSupabase / help-and-questions
8mo ago
supabase functions deploy and deno.json
SupabaseSSupabase / help-and-questions
4mo ago
JSON parsing issues with Supabase Edge Functions
SupabaseSSupabase / help-and-questions
4y ago