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

Following doc tutorial results in Function not found error message #52

Open
pedromassango opened this issue Aug 16, 2023 · 9 comments
Open

Comments

@pedromassango
Copy link

Hi,

After following the steps in https://docs.dartedge.dev/platform/supabase I get a Not found message while trying to test the function locally (http://localhost:54321/functions/v1/dart_edge).

Screenshot 2023-08-16 at 2 02 11 AM
@Ehesp
Copy link
Member

Ehesp commented Aug 17, 2023

You should see the generated code in the supabase directory in your project... is it there?

@pedromassango
Copy link
Author

It is there

@venkata-reddy-dev
Copy link

@Ehesp @pedromassango i am also facing same issue.

Screenshot 2023-11-07 at 7 35 07 PM

@tylandercasper
Copy link

tylandercasper commented Nov 30, 2023

had the same issue. It looks like it's putting the functions folder in the root instead of the supabase/functions folder.
Moving the folder into the supabase folder gets the functions to work again

running the command edge build supabase_functions --dev -p supabase also seems to work.

adding

supabase:
  projectPath: "supabase"

to the yaml appears to have no effect.

@venkata-reddy-dev
Copy link

venkata-reddy-dev commented Dec 20, 2023

@tylandercasper @pedromassango @Ehesp

Add supabase configuration in edge.yml file

supabase:
  functions:
    task1: 'lib/task1.dart'
    task2: 'lib/task2.dart'
  project_path: "supabase"

For me it got worked.

@alaincruz06
Copy link

alaincruz06 commented Dec 21, 2023

Having the same issue, this fix doesn´t work for me (or I´m using it wrong I guess), sad thing I can´t figure out the first steps just reading the docs.
Edited: somewhere, between moving the function into the supabase folder and creating/modifying the edge.yml file, it worked...shouldn´t be a tweak from the users side, but a fix from the devs side, just saying.

@tylandercasper
Copy link

I was able to get it working by adding this to the yaml:

supabase:
  project_path: "supabase"

you could probably be doubly safe by adding:

supabase:
  project_path: "supabase"
  projectPath: "supabase"

@henry2man
Copy link

running the command edge build supabase_functions --dev -p supabase also seems to work.

Hi there. We're facing the same issues, but currently they are related with supabase build -p option. The function is always transpiled to ./functions/dart_edge instead of ./supabase/functions/dart_edge. Any hints?

@henry2man
Copy link

Hi there. We're facing the same issues, but currently they are related with supabase build -p option. The function is always transpiled to ./functions/dart_edge instead of ./supabase/functions/dart_edge. Any hints?

In order to make this work you need to FIX dependencies in your pubspec.yaml file. For further reference, this is my pubspec.yaml

environment:
  sdk: ">=2.18.5 <3.0.0"

dependencies:
  edge: 0.0.6+1
  edge_http_client: ^0.0.1+3
  http: ^0.13.6
  json_annotation: ^4.8.1
  supabase: ^1.11.11
  supabase_functions: ^0.0.2+3

dev_dependencies:
  build_runner: any
  json_serializable: ^6.6.2

PS: Don't forget to reinstall dart edge in order to activate proper 0.0.6+1 version

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

6 participants