Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error Deploying billing-functions #95

Open
develanet opened this issue Nov 22, 2024 · 4 comments
Open

Error Deploying billing-functions #95

develanet opened this issue Nov 22, 2024 · 4 comments

Comments

@develanet
Copy link

This is my first time using this library. Following instructions on Deploying page in docs, ran into this issue while deploying billing functions:

Error: failed to create the graph

Caused by:
    Relative import path "@supabase/supabase-js" not prefixed with / or ./ or ../
        at https://deno.land/x/basejump@v2.0.3/billing-functions/src/wrappers/get-billing-status.ts:1:30
error running container: exit 1
Try rerunning the command with --debug to troubleshoot the error.
@bryanmoon1991
Copy link

bump on this ^ running into the same issue

@develanet
Copy link
Author

I ended up writing my own backend using NestJs to handle Stripe webhooks. Ooooh the joys of launching a startup SaaS 😂

@bryanmoon1991
Copy link

ended up hosting my own mod.ts and switched out the url in import after fixing the import path in my version.
For anyone who might be getting stuck while deploying the supabase functions:

  1. fork this repo https://github.com/usebasejump/basejump-deno-packages
  2. change the import paths in: billing-functions/src/wrappers/get-billing-status.ts & tests/utils/setup-basejump-account.ts from "@supabase/supabase-js" to "https://esm.sh/@supabase/supabase-js@2"
  3. push your changes to your forked repo
  4. then change the url in the import path found in basejump/supabase/functions/billing-functions/index.ts so that it points to the raw github hosted mod.ts in your forked repo. should look like this:
    https://raw.githubusercontent.com/{your-username}/basejump-deno-packages/refs/heads/main/billing-functions/mod.ts
  5. then you can deploy the functions without a problem, as well as make changes to the billing functions to better suit your need

@develanet
Copy link
Author

Awesome, thank you so much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants