You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Custom path mapping for dependencies with deno.json seems to be broken #2846
Hi @SanjoSolutions, thanks for reporting this issue. Are you perhaps using relative path imports in deno.json? Could you give us a minimal reproducible example to illustrate what's broken?
With the legacy import maps this works.
With the deno.json method with an import like import { billingFunctionsWrapper, stripeFunctionHandler, } from "basejump/billing-functions/mod.ts"; I receive the following error:
$ npx supabase functions serve
Setting up Edge Functions runtime...
Serving functions on http://127.0.0.1:54321/functions/v1/<function-name>
Using supabase-edge-runtime-1.60.1 (compatible with Deno v1.45.2)
serving the request with supabase/functions/billing-functions
worker boot error: failed to create the graph: Relative import path "basejump/billing-functions/mod.ts" not prefixed with / or ./ or ../
at file:///Users/jonas/saas-template/supabase/functions/billing-functions/index.ts:5:8
worker boot error: failed to create the graph: Relative import path "basejump/billing-functions/mod.ts" not prefixed with / or ./ or ../
at file:///Users/jonas/saas-template/supabase/functions/billing-functions/index.ts:5:8
InvalidWorkerCreation: worker boot error: failed to create the graph: Relative import path "basejump/billing-functions/mod.ts" not prefixed with / or ./ or ../
at file:///Users/jonas/saas-template/supabase/functions/billing-functions/index.ts:5:8
at async UserWorker.create (ext:sb_user_workers/user_workers.js:145:15)
at async Object.handler (file:///root/index.ts:156:22)
at async respond (ext:sb_core_main_js/js/http.js:163:14) {
name: "InvalidWorkerCreation"
Activity
sweatybridge commentedon Nov 7, 2024
Hi @SanjoSolutions, thanks for reporting this issue. Are you perhaps using relative path imports in deno.json? Could you give us a minimal reproducible example to illustrate what's broken?
SanjoSolutions commentedon Nov 7, 2024
Yes.
In my case the content is:
{ "imports": { "basejump/": "../../../../basejump-deno-packages/" } }With the legacy import maps this works.
With the deno.json method with an import like
import { billingFunctionsWrapper, stripeFunctionHandler, } from "basejump/billing-functions/mod.ts";I receive the following error:sweatybridge commentedon Nov 7, 2024
Thank you. I managed to reproduce the issue and pushed a fix.