Skip to content
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

Error on non-existent pages. #1015

Closed
webcrawls opened this issue Apr 14, 2021 · 1 comment
Closed

Error on non-existent pages. #1015

webcrawls opened this issue Apr 14, 2021 · 1 comment

Comments

@webcrawls
Copy link

Describe the bug
When setting up a fresh unmodified install of SvelteKit using the given install directions on the documentation page, all non-index pages (pages that don't exist, rather?) result in an error. I am unsure if this is an issue with SvelteKit or Svelte, as I'm not very familiar with this project.

To clarify, I am on SvelteKit v1.0.0-next.74 as reported from npm run dev.
Logs
Nothing (no errors) is printed to the console when visiting a page that does not exist.
The following error is displayed on the page when visiting a page that does not exist:

TypeError: Cannot read property 'message' of undefined
    at eval (C:\Users\kscott-laptop-window\projects\test\.svelte\dev\components\error.svelte:15:41)
    at Object.$$render (C:\Users\kscott-laptop-window\projects\test\node_modules\svelte\internal\index.js:1369:22)
    at Object.default (/C:\Users\kscott-laptop-window\projects\test\.svelte\dev/generated/root.svelte:57:127)
    at eval (C:\Users\kscott-laptop-window\projects\test\src\routes\$layout.svelte:11:41)
    at Object.$$render (C:\Users\kscott-laptop-window\projects\test\node_modules\svelte\internal\index.js:1369:22)
    at eval (/C:\Users\kscott-laptop-window\projects\test\.svelte\dev/generated/root.svelte:55:122)
    at $$render (C:\Users\kscott-laptop-window\projects\test\node_modules\svelte\internal\index.js:1369:22)
    at Object.render (C:\Users\kscott-laptop-window\projects\test\node_modules\svelte\internal\index.js:1377:26)
    at render_response (file:///C:/Users/kscott-laptop-window/projects/test/node_modules/@sveltejs/kit/dist/ssr.js:377:28)
    at async respond_with_error (file:///C:/Users/kscott-laptop-window/projects/test/node_modules/@sveltejs/kit/dist/ssr.js:2572:10)

To Reproduce

  • Follow the instructions on the Getting Started documentation page
    • mkdir my-app
    • cd my-app
    • npm init svelte@next
    • npm install
    • npm run dev
  • After the dev server starts, visit a non-existent page (i.e. localhost:3000/hello)

Expected behavior
No error should be displayed.

Severity
This bug, while not preventing me from developing the pages I want to develop, confuses me whether I need to create a 404 route, or there is something more going on. A more graceful error should be provided at least, imo.

@webcrawls
Copy link
Author

webcrawls commented Apr 14, 2021

As #996 appears to cover this issue and provides a fix for the bug, I will close this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant