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.

SvelteKit demo app 'todos' failing on delete

See original GitHub issue

Describe the bug The SvelteKit demo app seems to have a bug when deleting ‘todos’. It occurs when multiple todos are added and subsequently deleted.

Logs

--- Browser log
Failed to load resource: the server responded with a status of 500 (Internal Server Error)
{"status":500,"message":"Error deleting todo"}

Server log has no error messages

To Reproduce
  • Create a new SvelteKit demo app (npm init svelte@next app-dir), accepting all the defaults
  • cd app-dir
  • npm i
  • npm run dev – --open
  • Open devtools

Perform the following steps (You may experience the error prior to completing all steps):

  • Navigate to TODOS, enter 3 TODOS.
  • Delete first TODO
  • Delete last TODO
  • Delete remaining TODO
  • Enter 3 TODOs again
  • Delete first TODO
  • Delete last TODO

Expected behavior TODO’s are deleted when requested

Diagnostics
System:
    OS: Linux 5.8 Ubuntu 20.04.2 LTS (Focal Fossa)
    CPU: (6) x64 Intel(R) Core(TM) i5-8400 CPU @ 2.80GHz
    Memory: 25.99 GB / 31.04 GB
    Container: Yes
    Shell: 5.0.17 - /bin/bash
  Binaries:
    Node: 14.17.0 - /usr/bin/node
    Yarn: 1.22.10 - /usr/local/bin/yarn
    npm: 7.12.0 - /usr/local/bin/npm
  Browsers:
    Brave Browser: 90.1.24.85
    Chrome: 90.0.4430.212
    Firefox: 88.0.1
  npmPackages:
    @sveltejs/kit: next => 1.0.0-next.109 
    svelte: ^3.34.0 => 3.38.2 

using Chrome (also fails using Firefox)

no adapter specified

Severity Not severe. It may affect user perception of stability when evaluating SvelteKit.

Additional context Failure is also present when running on Windows.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:5
  • Comments:14 (6 by maintainers)

github_iconTop GitHub Comments

17reactions
hb0nescommented, Mar 14, 2022

I just wanted to comment here that I almost quit investing more time into SvelteKit because the Todo’s really seem slow and wonky.

I can just click randomly on the Todo’s until it ‘breaks’. When it breaks, it will check the Todo but then after a second or more, change its mind again.

I don’t know, it’s just very bad/wonky UX.

Seeing as it’s one of the first thing new devs picking up Svelte will see, this is bad news.

12reactions
denniskecommented, Feb 15, 2022

I was checking out sveltekit today and the laggy experience of the todos page put me off. After changing it to an in memory store in /todos/index.ts the response times of the api requests went from 300+ ms to ~5ms. I think this should be the default experience for new sveltekit users.

If the external api todos page is needed for showing features of sveltekit, I would suggest to make two todos pages (one with in memory and one with external api).

Read more comments on GitHub >

github_iconTop Results From Across the Web

Introduction • Docs • SvelteKit
SvelteKit is a framework for rapid development of robust, performant web applications. Building an app with all the modern best practices is fiendishly ......
Read more >
Sveltekit Todos Example... Where is the data being stored?
It's a simple page where you can add an delete things to do tasks. And I'm trying to figure out how the individual...
Read more >
Make a Svelte Todo App
Learn Svelte by making an awesome Svelte todo app. ... to learn because everything you build includes creating, reading, updating and deleting content....
Read more >
TypeScript support in Svelte - Learn web development
We will now learn how to use TypeScript in Svelte applications. ... We will get the following error: type error in vscode, Todo...
Read more >
Error 500 in Server Funtions with Sveltekit demo app - Support
we need to know your netlify site name. Example: gifted-antelope-58b104.netlify.app -https://funny-pegasus-f8ef20.netlify.app/todos I am ...
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