Skip to content

Crawling resolves to incorrect URL #14512

@hyunbinseo

Description

@hyunbinseo

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/kit@2.42 && 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions