-
-
Notifications
You must be signed in to change notification settings - Fork 382
Closed
Labels
Description
Description
I am experimenting with vike and ssr, and have come upon an error.
My goal was to create a page with index and id, and have it pre-rendered.
These are my first steps with vike, so it is easily possible that I am overlooking something obvious.
What I have done:
- Created a new vike project using
npm create vike@latest --- --react --eslint - Removed the pages for todo and star-wars
- Created new page called
pokemonwith@idandindex - Made sure that the page works in dev mode
- Added
prerender: truetopages/+config.ts - Added a
+onBeforePrerenderStart.tsfile inside the folder of my page, it reads an api, and returns an array of url strings - Run
npm run build
What I expect:
- The pages are pre-rendered.
What I see:
- I receive the error
URL /pokemon/bulbasaur provided twice by the onBeforePrerenderStart() hook (/pages/pokemon/+onBeforePrerenderStart.ts). Make sure to provide the URL only once instead. - By adding logs, I see that the onBeforePrerenderStart hook is executed twice, in parallel (function starts, function starts, function ends, function ends). I have made sure that the returned url array does not contain duplicates.
- Added
.serveror.sharedmakes no difference. - Adding
.clientleads to the page not being pre-rendered
Reactions are currently unavailable