Closed smastrom closed 9 months ago
I recently started to test this. I'm encountering the 8000057
issue with the 9.0.0
release.
Overlapping rules in
_routes.json
are not allowed
Here's my Astro Info:
Astro v4.2.6
Node v20.11.0
System macOS (arm64)
Package Manager npm
Output hybrid
Adapter @astrojs/cloudflare
Integrations @astrojs/tailwind
@astrojs/svelte
Thus far, I'm unable to isolate where the point of failure is so far.
I have several /api
endpoints, nested sub directories alongside several Astro.redirect
touch points. It is mostly SSR alongside a few static touch points.
That probably isn't enough to jog any ideas, but on the chance it provides a eureka moment about some edge cases, I thought I'd provide some preliminary feedback.
If you have any tips/thoughts, let me know.
Thanks!
The overlapping issue should be fixed. You could provide a reproduction example, and I can check.
Hi! I just started to face the same issue. It was working until recently without any problems.
Now, pages x/*
and x/*/y
(and any other route with the same structure) will throw the exact same error:
Error: Failed to publish your Function. Got error: Error 8000057: Overlapping rules in "_routes.json" are not allowed. Rule "/x/*/y" is overlapped by "/x/*". Remove one of the rules to continue.
This is totally breaking my software and prevents me from deploying any updates. I came to open a new issue but found this. Please let me know what you think.
This is totally breaking my software and prevents me from deploying any updates. I came to open a new issue but found this. Please let me know what you think.
I'm sorry to hear that. Please open a new issue with a reproducible example for your specific issue using https://astro.new
This is totally breaking my software and prevents me from deploying any updates. I came to open a new issue but found this. Please let me know what you think.
I'm sorry to hear that. Please open a new issue with a reproducible example for your specific issue using https://astro.new
@alexanderniebuhr I have the same issue. Astro supports these "overlaps", but it seems these generated _routes don't. Is that something that cloudflare can/will improve, or is that a fundamental limitation and we have to work around it?
My build error:
Error 8000057: Overlapping rules in `_routes.json` are not allowed. Rule "/game/*/form" is overlapped by "/game/*". Remove one of the rules to continue.
Generally it is not an issue. Please also create an example for your specific case.
I also want to let you know that the new version of the Cloudflare adapter, currently in development, will have a new _routes.json
generation
This is totally breaking my software and prevents me from deploying any updates. I came to open a new issue but found this. Please let me know what you think.
I'm sorry to hear that. Please open a new issue with a reproducible example for your specific issue using https://astro.new
@alexanderniebuhr I have the same issue. Astro supports these "overlaps", but it seems these generated _routes don't. Is that something that cloudflare can/will improve, or is that a fundamental limitation and we have to work around it?
My build error:
Error 8000057: Overlapping rules in `_routes.json` are not allowed. Rule "/game/*/form" is overlapped by "/game/*". Remove one of the rules to continue.
Any updates on this? @EskelCz were you able to find a work around?
The workaround is to provide your own custom _routes.json
file in public/_routes.json
.
v10 of the adapter which should release this week, should also fix the issue hopefully
Astro Info
If this issue only occurs in one browser, which browser is a problem?
No response
Describe the Bug
Hello, I'm developing an Astro website with static pages generated at the following paths:
/companies/index.astro
/companies/[slug].astro
/blog/index.astro
/blog/[slug].astro
Any other page is server-side rendered.
In order to avoid the
_routes.json
100-entries limit error addressed in withastro/astro#6516, I'm manually excluding the static paths as described in the docs:The redundant paths
/companies/
and/blog/
are not stripped away from the generated_routes.json
if I have set the following redirect in404.astro
:Causing the following deploy error (as
/companies/*
and/blog/*
are also present in the_routes.json
file):Generated routes.json
What's the expected result?
Link to Minimal Reproducible Example
https://stackblitz.com/edit/withastro-astro-cykvsk?file=dist%2F_routes.json
Participation