© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabase•4y ago•
3 replies
drewbie

How to import local code into Deno function?

I am no table to import a local file into a Deno / Edge function. It allows me to import a local file as long as its within the supabase directory, but I am using a monorepo and am trying to import files and functions that are used in other places within the app.

My example is pretty straight forward and I cant seem to figure out how to reused simple functions in an Edge function.

packages/app/foo.ts
packages/app/foo.ts

export function foo() { return true; }
export function foo() { return true; }


packages/backend/supabase/functions
packages/backend/supabase/functions

import { foo } from 'app'; 
TS2305 [ERROR]: Module '"deno:///missing_dependency.d.ts"' has no exported member 'foo'.
import { foo } from 'app'; 
TS2305 [ERROR]: Module '"deno:///missing_dependency.d.ts"' has no exported member 'foo'.

have also tried
import { foo } from '../packages/app/foo.ts'
import { foo } from '../packages/app/foo.ts'

and I get the same error.
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

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