Skip to content

More descriptive docs for getting started with edge functions #6218

Open
@dbzx10299

Description

@dbzx10299

Which problem is this feature request solving?

The docs state that to get started with edge functions you create a default export of an arrow function in a file under netlify/edge-functions/hello.js and just run netlify dev and in the browser everything should work if you visit http://localhost:8888/hello. I am on mac and this did not work at all and I could not find any information online.

The first problem I encountered when I ran netlify dev was that there was a message

Setting up the Edge Functions environment. This may take a couple of minutes.

This would never finish at all. If I would visit http://localhost:8888/hello then I would just get a 404.

I had to run brew install deno otherwise this would not work. Once I installed deno and ran netlify dev I got a new message

Warning: Could not process edge functions dependency graph. Live reload will not be available.

The only way to get this to work was to run git init and git commit -m "initial commit"

Describe the solution you'd like

The docs are incomplete for getting started with edge functions. Getting everything to work is not so obvious, and I also found a netlify channel on youtube documenting how to create an edge function. It makes no mention of having deno installed on the machine. I cloned the repo from the youtube video (https://www.youtube.com/watch?v=6pEVhH37xQE&t=398s) and nothing worked until I installed deno.

I would like to see more complete docs for how to get a basic bare bones example working because finding the solution was not straight forward and I am sure many others will run into a roadblock there as well.

Pull request (optional)

  • I can submit a pull request.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @serhalp@dbzx10299

        Issue actions

          More descriptive docs for getting started with edge functions · Issue #6218 · netlify/cli