question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to navigate to non-root routes by links

See original GitHub issue

Describe the bug When navigating to a page that isn’t /(e.g /blog and /works) using links, the page being rendered is the $error one. But you can navigate to / perfectly well.

Also, if this error shows up and you reload the page, the page renders fine, but then if you navigate to any non-/ page and come back, its again $error

Logs Screenshot image

Text:

<$error> received an unexpected slot "default".
$error.svelte? [sm]:6 <$error> was created with unknown prop 'blogsList'

To Reproduce Repro: https://github.com/PuruVJ/sveltekit-error-repro

Run npm run dev Then visit / on localhost Then click on the link.

You should see this

image

Reload: You’ll see the page perfectly and the data will be logged to console. Go to Home by clicking on the link, then come back to /blog by clicking the link on home. Again the error will be there

Expected behavior When I should navigate by links to any of these routes, the correct component should render and I should see the page, irrespective of which page I’m navigating from and how many times

Information about your SvelteKit Installation:

Diagnostics
 System:
    OS: Windows 10 10.0.19042
    CPU: (8) x64 Intel(R) Core(TM) i5-8265U CPU @ 1.60GHz
    Memory: 1000.34 MB / 7.86 GB
  Binaries:
    Node: 14.16.1 - C:\Program Files\nodejs\node.EXE
    npm: 6.14.12 - C:\Program Files\nodejs\npm.CMD
  npmPackages:
    @sveltejs/kit: ^1.0.0-next.100 => 1.0.0-next.100
    svelte: ^3.38.2 => 3.38.2
    vite: ^2.2.4 => 2.2.4

Severity High severity. Unable to run Dev properly, plus it is breaking the prod build too(My assumption)

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:15 (4 by maintainers)

github_iconTop GitHub Comments

6reactions
PuruVJcommented, Jun 10, 2021

NVM figured it out

1reaction
n1kkcommented, Jan 10, 2022

Oh, yeah, you’re right, it’s because of the absence of trailing slash. How foolish of me 😄, sorry.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Can't access some commands when logged in with non-root ...
This will show you root's PATH. You will note that the directory where service can be found is listed here. do exit to...
Read more >
db2iupdt fails when run as root - Forums - IBM Support
Either DB2 not installed by root or may someone changed the permission and ownership of DB2 installed path recursively. Even if someone change...
Read more >
unable to run docker as non-root user? - Stack Overflow
I can also browse through web-ui of jenkins, which is only ... ENV PATH $JAVA_HOME/bin:$PATH # configure symbolic links for the java and ......
Read more >
PAM error for non root users, unable to log in
Environment. Red Hat Enterprise Linux 5. Issue. Non-root users universally seem to fail in attempting to log in via ssh OR via console....
Read more >
Non root user unable to login with ssh key - DigitalOcean
ssh or authorized_keys is a symbolic link, the canonical path (with symbolic links expanded) is checked. Your ~ /.ssh/authorized_keys file (on ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found