Skip to content

Crawler doesn't discover / if there is an optional parameter at the base #11133

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

Open
LorisSigrist opened this issue Nov 28, 2023 · 0 comments · Fixed by #11178
Open

Crawler doesn't discover / if there is an optional parameter at the base #11133

LorisSigrist opened this issue Nov 28, 2023 · 0 comments · Fixed by #11178
Labels
paths.base bugs relating to `config.kit.paths.base`

Comments

@LorisSigrist
Copy link
Contributor

Describe the bug

The Crawler for prerendering does not discover the / path, if there is an optional Parameter at the base.
This is a common scenario in multi-language pages.

routes
|- layout.js //enable prerender
|- [[lang]]
    |- +page.svelte //Not found

I would expect / to get crawled, and further pages to be discovered from there.
The workaround is to add / to the entries in svelte.config.js

Reproduction

https://github.com./LorisSigrist/sk-crawler-optional-param-at-base-reproduction

Logs

Error: The following routes were marked as prerenderable, but were not prerendered because they were not found while crawling your app:
  - /[[lang]]

System Info

System:
    OS: macOS 14.0
    CPU: (8) arm64 Apple M1
    Memory: 101.14 MB / 8.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 21.2.0 - /opt/homebrew/bin/node
    Yarn: 1.22.19 - /opt/homebrew/bin/yarn
    npm: 10.2.3 - /opt/homebrew/bin/npm
    pnpm: 8.11.0 - /opt/homebrew/bin/pnpm
    bun: 0.8.1 - /opt/homebrew/bin/bun
  Browsers:
    Chrome: 119.0.6045.159
    Chrome Canary: 121.0.6153.0
    Safari: 17.0
  npmPackages:
    @sveltejs/adapter-auto: ^2.0.0 => 2.1.1 
    @sveltejs/kit: ^1.27.4 => 1.27.6 
    svelte: ^4.2.7 => 4.2.7 
    vite: ^4.4.2 => 4.5.0

Severity

annoyance

Additional Information

No response

@eltigerchino eltigerchino added the paths.base bugs relating to `config.kit.paths.base` label Dec 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
paths.base bugs relating to `config.kit.paths.base`
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants