Quantcast
Channel: Active questions tagged svelte - Stack Overflow
Browsing all 1539 articles
Browse latest View live
↧

Unexpected character '@' when migrating from Svelte 4 to Svelte 5

I am migrating a a Svelte 4 app to a Svelte 5 app, I used the npx command linenpx sv migrate svelte-5This resulted in my <slot /> tag in my layout.svelte file on my front page being replaced with...

View Article


Svelte equivalent of React's props.children?

I haven't found this feature anywhere in svelte 3..I want it to be something like this..App.svelte<Error><p>Can't connect to the...

View Article


Reactive Table in shadcn-svelte for every change in table row content (Edit...

I am building the web app using svelte and sveltekit.And for UI i am using shadcn-svelte library.I am using the exact same case like given in documentation such as call the DataTable component from...

View Article

What is the type of a Svelte component?

When you look at this code:<script lang="ts"> import RedThing from "./RedThing.svelte"; import GreenThing from "./GreenThing.svelte"; const things: Record<string, typeof RedThing> = { red:...

View Article

How do I pass a value to a svelte.ts file?

I am currently creating an Svelte 5 app using Konva.This is what the component looks like:<!-- Canvas.svelte --><script lang="ts"> import { Stage, Rect, Layer, Line } from 'svelte-konva';...

View Article


reloading a page in Svelte5 + svelteKit returns 500 Internal server error,...

I have a page on my site that is at the route routes/gallery in SvelteKit, and clicking on a a tag links to it correctly. But when I reload the page with the browser reload button, I get a 500 internal...

View Article

Svelte 5 form data not reactive in submit handler

I am trying to implement a form submit action in Svelte 5 but I am having some issues with reactivity it seems.<script> const formData = $state({ name: 'abc', }) const saveData = (e) => {...

View Article

How to set headers for assets within _app/immutable/workers?

I've successfully built a SvelteKit app, but when I try to run npm rum preview, I see that the following asset was unable to be...

View Article


SvelteKitError: Not found: /@id/__x00__virtual:__sveltekit/paths &&...

i've got a problem when i run npm run dev with my SvelteKit AppOvernight, when i launch my dev mode i've got this :PS C:\wamp64\www\blog> npm run dev> blog@0.0.1 dev> vite dev15:29:10...

View Article


svelte.config.js: Unexpected option config.kit.vite

I just started learning Svelte/kit, I stated a small project to learn, I wanted a calendar. I found svelte-calendar package in npm. I installed the package,npm i svelte-calendarAnd I set this in...

View Article

Dynamically compile .svelte source code to a view (REPL-like component)

Dynamically compile .svelte source code to a view (REPL-like component)I'm building a REPL-like feature in my SvelteKit app, where users can input .svelte code, and it gets dynamically compiled and...

View Article

I can't delete an entry from table using SvelteKit & Supabase. Row-Level...

I'm working on the delete functionality for my SvelteKit app with Supabase integration. The issue I'm facing is that I can only delete an entry when RLS (Row Level Security) is disabled. When RLS is...

View Article

How to debounce / throttle with Svelte?

So i currently have:App.html<div><input on:input="debounce(handleInput, 300)"></div><script> import { debounce } from 'lodash' export default { data () { name: '' }, methods: {...

View Article


I'm trying to call a svelte route through a url in the browser. It give me a 404

I am trying to use a svelte app to call an api route. I made a simple svelte app with npm init svelte@next svelte-api-calling. I added the file routes/api/callthis/[name].ts, and it looks like...

View Article

Problem When Deploying Sveltekit Project to Vercel

So I Was trying to deploy my Sveltekit app with Vercel but this happened:Cloning completed: 221.226msPrevious build cache not availableUsing prebuilt build artifacts...Error: Config file was not found...

View Article


$state is not defined when testing Svelte component

I am trying to test a simple Svelte component using Jest and @testing-library/svelte, but I am encountering the following error:Error ReferenceError: $state is not defined 3 | 4 | it('it works', async...

View Article

Svelte v4 $: statement rerun unnecessarily

I have some strange things happening on my svelte code, here are the simplified version of my code+page.svelte import { writable } from 'svelte/store' import Provider from...

View Article


SvelteKitError: Not found: /@id/__x00__virtual:__sveltekit/path

I encounter an error when i run npm run dev with my project...This error appeared overnight, i've tried to rollback my code with old good version, change my nodejs version, run it vm but nothing...

View Article

How to update the page and query parameters in SvelteKit?

I have a page with a search field. If accessed with a query parameter (e.g. ?word=cat) the page should load with results present and the search field filled. If a search is done the results and the...

View Article

Why tailwind css doesn't work on my sveltekit project with vite?

I have a svelte kit project that has installed tailwind css, but the tailwind css doesn't work.The tailwind css classes doesn't affect the text i have, here my code in ./src/routes/+page.svelte:<h1...

View Article
Browsing all 1539 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>