Edge function / 11ty Edge error

Site: oceg-web-site.
URL: https://www-preview.oceg.org/

We’ve been building this for the past 3 months, everything worked fine, then the past couple of weeks we started getting errors occasionally (same URLs, inconsistent errors), we’ve removed all edge functions except for the one handling 11ty edge, and now after every deploy, every page shows this (nothing in the edge function log, despite multiple log calls). Everything runs great locally on netlify dev server. I’m running out of ideas to debug this.

This edge function has crashed

An unhandled error in the function code triggered the following message:

The deployment failed while serving the request.

Connection details

Netlify internal ID: 01GD1GR2115TH5PD8YGE7P3M2V

I removed ALL edge functions except one, and narrowed down the error to the import statement referencing eleventy:edge.

This line…

import {EleventyEdge} from ‘eleventy:edge’;

breaks the site. This was working find until now. Did support for 11ty edge get removed???

Found a solution. Looks like the 11ty author has created a Github repo to manage CDN releases of the Deno plugin: GitHub - 11ty/eleventy-edge-cdn

Changing the reference in the import statement to https://cdn.11ty.dev/edge@2.0.1/eleventy-edge.js fixed the problem.

1 Like

Here’s the official fix from 11ty author:

1 Like

Thanks so much for coming back and sharing that! Glad you found the solution.