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

Astro Endpoints are not working #25

Closed
MykalMachon opened this issue Oct 18, 2024 · 3 comments
Closed

Astro Endpoints are not working #25

MykalMachon opened this issue Oct 18, 2024 · 3 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@MykalMachon
Copy link

Hello all!

I've recently tried moving my blog over to the deno runtime via this adapter.
Almost everything is working okay. The exception being all of my sites Astro "endpoints"..

I use these to generate RSS (XML) and JSON feed files for my blog post content.

What goes wrong

When running the site under deno, I see a 500 error and receive the following stack trace in the console:

22:17:23 [ERROR] TypeError: Cannot change headers: headers are immutable
   at Headers.set (ext:deno_fetch/20_headers.js:425:13)
   at setOriginHeader (file:///home/mykal/projects/mykalmachon/mykal.codes/website/dist/server/entry.mjs:91871:19)
   at Function.create (file:///home/mykal/projects/mykalmachon/mykal.codes/website/dist/server/entry.mjs:91957:5)
   at eventLoopTick (ext:core/01_core.js:175:7)
   at async _App.render (file:///home/mykal/projects/mykalmachon/mykal.codes/website/dist/server/entry.mjs:92711:29)
   at async Server.handler (file:///home/mykal/projects/mykalmachon/mykal.codes/website/dist/server/entry.mjs:92895:24)
   at async Server.#respond (https://deno.land/[email protected]/http/server.ts:299:18)

Dependencies

Here are my dependencies

{
  "name": "website",
  "type": "module",
  "version": "0.0.1",
  "scripts": {
    "dev": "astro dev",
    "start": "astro dev",
    "build": "astro build",
    "preview": "deno run -A ./dist/server/entry.mjs",
    "format": "deno fmt && prettier --write .",
    "info": "astro info"
  },
  "dependencies": {
    "@astrojs/node": "^8.3.4",
    "@deno/astro-adapter": "^0.1.3",
    "@uidotdev/usehooks": "^2.3.1",
    "astro": "^4.16.1",
    "astro-icon": "^0.8.1",
    "markdown-it": "^13.0.2",
    "minisearch": "^6.3.0",
    "open-props": "^1.5.15",
    "react": "^18.2.0",
    "react-dom": "^18.2.0",
    "react-snowfall": "^1.2.1"
  },
  "devDependencies": {
    "@astrojs/react": "^3.6.2",
    "@astrojs/rss": "^4.0.8",
    "@astrojs/sitemap": "^3.2.0",
    "@types/markdown-it": "^13.0.1",
    "@types/react": "^18.2.22",
    "@types/react-dom": "^18.2.7",
    "reading-time": "^1.5.0",
    "sanitize-html": "^2.11.0"
  }
}
@Phenome
Copy link

Phenome commented Nov 1, 2024

I have the same issue since I redeployed my astro site with SSR, with the backend now on Deno 2, I think

@kt3k kt3k added bug Something isn't working help wanted Extra attention is needed labels Nov 6, 2024
@kt3k kt3k pinned this issue Nov 6, 2024
@marc2332
Copy link

I think this can be closed, it works just fine with the latest release :)

@MykalMachon
Copy link
Author

I did some testing and I've confirmed that this doesn't throw errors anymore.
Thank you for the heads up @marc2332

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

4 participants