How to handle dynamically created pages in routing? #1661
Unanswered
OrangeTimes
asked this question in
Help & Questions
Replies: 1 comment 15 replies
-
Hm, I wouldn't know what the issue could be. The best would be a minimal reproduction. |
Beta Was this translation helpful? Give feedback.
15 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm creating +Page.js dynamically by fetching them from npm server using vike and Fastify server. When executing a request for the first time it fails with 404. The next request renders the page correctly as expected. As I understand the internal router map is unaware of the newly created page on the filesystem. Here is the log when trying to render /test/[email protected]
4:14:41 PM [vike][request(2)] HTTP request: /test/[email protected]
4:14:41 PM [vike][config] created /test/[email protected]/+Page.js
4:14:41 PM [vike][request(2)] URL /test/[email protected] doesn't match the route of any of your pages:
│ / │ Filesystem Route │ /pages/ │
│ /about │ Filesystem Route │ /pages/about/ │
│ /star-wars │ Filesystem Route │ /pages/star-wars/index/ │
│ /star-wars/@id │ Filesystem Route │ /pages/star-wars/@id/ │
│ /test │ Filesystem Route │ /test/ │
│ /test/[email protected] │ Filesystem Route │ /test/[email protected]/ │
See https://vike.dev/routing for more information about routing.
4:14:41 PM [vike][request(2)] HTTP response /test/[email protected] 404
I have read the documentation on routing in vike but cannot figure out hot to handle this situation
Beta Was this translation helpful? Give feedback.
All reactions