Skip to content

🐛 BUG: deploying to netlify edge functions results in error #3420

@mayank99

Description

@mayank99

What version of astro are you using?

1.0.0-beta.31

Are you using an SSR adapter? If so, which one?

@astrojs/netlify/edge-functions

What package manager are you using?

npm

What operating system are you using?

Windows

Describe the Bug

I created a new astro repo with the portfolio template using npm init astro -- --template portfolio.

Then I installed @astrojs/netlify@0.4.0 and changed my astro.config.mjs as follows:

  import { defineConfig } from 'astro/config';
  import preact from '@astrojs/preact';
+ import netlify from '@astrojs/netlify/edge-functions';

  export default defineConfig({
   integrations: [preact()],
+  adapter: netlify(),
  });

Then I pushed the changes to my repo. Netlify runs auto-deploy with its default settings. The site deploys "successfully" but results in Error: TypeError: invalid URL: relative URL with a cannot-be-a-base base as seen on https://new-astro-netlify-edge.netlify.app/

See logs in my comment below.

Using the normal netlify functions adapter works perfectly fine.

Link to Minimal Reproducible Example

https://github.com/mayank99/astro-netlify-edge

Participation

  • I am willing to submit a pull request for this issue.

Metadata

Metadata

Assignees

Labels

- P5: urgentFix build-breaking bugs affecting most users, should be released ASAP (priority)

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions