lib icon indicating copy to clipboard operation
lib copied to clipboard

locale-router with prerendering fails

Open Metis77 opened this issue 1 year ago • 3 comments

Whenever I try to add sveltekit prerendering I get errors like:


node:internal/event_target:1083
  process.nextTick(() => { throw err; });
                           ^
Error: The following routes were marked as prerenderable, but were not prerendered because they were not found while crawling your app:
  - /[lang]/about

What should the example locale-router should look like, that this would work?

Metis77 avatar Jun 24 '24 15:06 Metis77

Would also like info on this.

bertPB avatar Jun 26 '24 15:06 bertPB

This might also be related to https://github.com/sveltekit-i18n/lib/issues/132

Metis77 avatar Jun 26 '24 15:06 Metis77

You need a link that points to those pages or add them svelte.config.js like

		prerender: {
			entries: supportedLocales.reduce((acc, locale) => [...acc, `/${locale}`, `/${locale}/401`, `/${locale}/403`, `/${locale}/404`, `/${locale}/500`], ['*']),
		}

Check out the examples.

lukas-buergi avatar Aug 11 '24 12:08 lukas-buergi