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

404 deployed on Vercel Edge #256

Open
MickL opened this issue Apr 1, 2024 · 4 comments
Open

404 deployed on Vercel Edge #256

MickL opened this issue Apr 1, 2024 · 4 comments

Comments

@MickL
Copy link

MickL commented Apr 1, 2024

I am using this module @nuxtjs/sitemap version 5.1.2 which works fine on localhost but unfortunately deployed to Vercel using NITRO_PRESET=vercel_edge is shows a 404. The 404 comes from Vercel itself, not from Nuxt.

/robots.txt generated by nuxt-simple-robots is available.

------------------------------
- Operating System: Darwin
- Node Version:     v21.6.1
- Nuxt Version:     3.11.1
- CLI Version:      3.11.1
- Nitro Version:    2.9.5
- Package Manager:  [email protected]
- Builder:          -
- User Config:      extends, css, modules, runtimeConfig, image, i18n, ignore, routeRules, site, robots, sitemap, vite
- Runtime Modules:  nuxt-icon@^0.6.8, @vee-validate/nuxt@^4.12.6, @nuxtjs/sitemap@^5.1.2, nuxt-simple-robots@^4.0.0-rc.16
- Build Modules:    -
------------------------------
@mahmoudyusof
Copy link

It seems that there are some presets with which sitemaps are not generated at all. in my case it is the github_pages preset.
I tried building locally with multiple presets and found the following

  • works
    • node
    • netlify
    • static
  • doesn't work
    • vercel (now that I know)
    • github_pages

harlan-zw added a commit that referenced this issue Jul 1, 2024
@harlan-zw
Copy link
Collaborator

I've pushed up a fix for github_pages as I was able to reproduce the issue. I have my personal site on Vercel and it seems to be working fine, Vercel Edge may have some issues though, didn't attempt to replicate.

@harlan-zw harlan-zw reopened this Jul 1, 2024
@harlan-zw harlan-zw changed the title 404 deployed on Vercel 404 deployed on Vercel Edge Jul 1, 2024
harlan-zw added a commit that referenced this issue Jul 26, 2024
@harlan-zw
Copy link
Collaborator

I tried to debug this but I had no success, it looks like vercel is trying to serve a public file or something instead of hitting the server endpoint. There's no error logs though...

For the time being I'm forcing the prerender of the sitemap for vercel edge

@harlan-zw
Copy link
Collaborator

Might need to do some rewrite magic...

vercel/vercel#6107

Should be an upstream Nitro bug though

@harlan-zw harlan-zw reopened this Jul 26, 2024
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

3 participants