© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabase•7mo ago•
1 reply
drewguy3

How to import Local packages into Edge functions in monorepo?

I've created a utility package for sharing functions across a turborepo environment. I am having issues importing functions from my monorepo utils package when there are additional imports in that package source file.


In my import_map.json:

{
"imports": {
"@utils": "../../packages/utils/src/testDenoImport.ts"
}
}

This works fine when my testDenoImport.ts file looks like this:


export function helloWorld(name: string) {
console.log("Hello ", name);
}

As soon as I have additional dependencies and it looks like this:


import { decode } from "base64-arraybuffer";
export function helloWorld(name: string) {
console.log("Hello ", name);
}

export async function decodeImage(imageBase64: string) {
return decode(imageBase64);
}


The edge functions stop working:

InvalidWorkerCreation: worker boot error: failed to create the graph: Relative import path "base64-arraybuffer" not prefixed with / or ./ or ../ and not in import map from "file:///Users/..../packages/utils/src/testDenoImport.ts"


Any help would be appreciated!
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

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

How to import Local packages into Edge functions in monorepo?
SupabaseSSupabase / help-and-questions
7mo ago
Referencing local monorepo packages in Edge Functions?
SupabaseSSupabase / help-and-questions
3mo ago
Importing local code into Deno + Edge Functions
SupabaseSSupabase / help-and-questions
4y ago
How to stop local running edge functions?
SupabaseSSupabase / help-and-questions
4mo ago