Svelte

Crawling resolves to incorrect URL

#14512

Development PRs

Issue

Solved
H
hyunbinseo
Sep 23, 2025, 1:42 AM

Describe the bug

<script>
  import { resolve } from "$app/paths";
</script>

<!-- 
  [404] GET /lv1/lv1
  
  node:internal/event_target:1101
    process.nextTick(() => { throw err; });
                             ^
  Error: 404 /lv1/lv1 (linked from /lv1/lv2)
->

<!-- Link works in vite dev -->
<a href="{resolve('/lv1')}">Hey</a>

Reproduction

https://github.com/hyunbinseo/svelte-kit-14512

Logs

pnpm build
[404] GET /lv1/lv1

node:internal/event_target:1101
  process.nextTick(() => { throw err; });
                           ^
Error: 404 /lv1/lv1 (linked from /lv1/lv2)
pnpm i @sveltejs/[email protected] && pnpm build
> Using @sveltejs/adapter-auto
  Could not detect a supported production environment. See https://svelte.dev/docs/kit/adapters to learn how to configure your app to run on the platform of your choosing
  ✔ done

System Info

System:
  OS: Windows 11 10.0.26100
  CPU: (8) x64 Intel(R) Core(TM) Ultra 7 258V
  Memory: 5.24 GB / 31.48 GB
Binaries:
  Node: 24.8.0 - ~\AppData\Local\fnm_multishells\42720_1758590779869\node.EXE
  Yarn: 1.22.22 - ~\AppData\Local\fnm_multishells\42720_1758590779869\yarn.CMD
  npm: 11.6.0 - ~\AppData\Local\fnm_multishells\42720_1758590779869\npm.CMD
  pnpm: 10.17.1 - ~\AppData\Local\fnm_multishells\42720_1758590779869\pnpm.CMD
Browsers:
  Edge: Chromium (140.0.3485.54)
npmPackages:
  @sveltejs/adapter-auto: ^6.1.0 => 6.1.0
  @sveltejs/kit: ^2.43.1 => 2.43.1
  @sveltejs/vite-plugin-svelte: ^6.2.0 => 6.2.0
  svelte: ^5.39.4 => 5.39.4
  vite: ^7.1.7 => 7.1.7

Severity

blocking an upgrade

👍 2

Info

Closed at Sep 26, 2025, 6:25 PM
Assignees None
Labels None
Milestone None

Pro tip: You can prefix GitHub URLs of issues, PRs or discussions with svcl.dev/ to view them on this page! Also try it on a GitHub release ;)