3,012 questions
0
votes
3
answers
59
views
Cannot render a value from a Float32Array
I am trying to render an element from a Float32Array using Svelte.
let laterTimeIndex = hourlyWeatherData.time
.find((timeData: Date) =>
timeData.getHours() === (currentTime + 5) % 24
...
2
votes
1
answer
42
views
Is there a way to exclude specific dates using Flowbite-Svelte's Datepicker?
I am working on a simple website, using SvelteKit. For the UI, I use Flowbite-Svelte and some of its components.
During early stages of development, I just used the availableFrom property. Now I want ...
1
vote
1
answer
65
views
Route fallthrough with sveltekit
I am trying to create a generic API app that heavily uses the Accept header using SvelteKit. Some example routes are:
GET /[schema] - HTML page with list of {schema} items
GET /[schema] Accept: ...
1
vote
1
answer
78
views
Creating new SvelteKit project fails with "Failed to install dependencies"
I enter "npx sv create" as I have done successfully numerous times before, and choose all defaults. The usual spinner begins, but this error appears. I have rebooted, tried different clean ...
1
vote
1
answer
108
views
@layer base is used but no matching @tailwind base directive is present
I'm having issue with tailwindcss 4. On fresh new project when I run the app the error occurs:
C:/Users/Maxima/Desktop/System_obslugi_praktyk/src/app.css:45:1: @layer base is used but no matching @...
2
votes
1
answer
61
views
how to create a function that recieves a path compatible with the resolve fn
I'm creating a component that will receive several RouteId and create links
I want to use the resolve fn to validate them
see: https://svelte.dev/docs/kit/$app-paths#resolve
If I declare a prop (or a ...
1
vote
1
answer
251
views
Tauri window opens fine on macOS but hangs with blank window on Windows (no logs after #2)
I’m developing a desktop app with Rust + Tauri (v2.5) + SvelteKit.
On macOS my command for opening a new settings window works perfectly. On Windows however, the app freezes when building the window: ...
1
vote
0
answers
45
views
Page won't start painting until the promise is fulfilled in load function
I just started learning Svelte. Here's a small problem I encountered recently:
I’m trying to use {#await} in SvelteKit to simulate a loading state while waiting for server data.
Here’s my setup:
<!-...
0
votes
1
answer
104
views
Hydration failed because the initial UI does not match what was rendered on the server
"@sveltejs/kit": "^2.34.0"
I am adding a close button to the svelte shadcn Tabs component and get this error. I have seen many questions on this in other frameworks but not ...
0
votes
1
answer
110
views
Error: column "displayUsername" of relation "users" does not exist in better-auth 1.3.6 and 1.3.7
I am getting the following error when I try to update a username in better-auth from a sveltekit client
# SERVER_ERROR: error: column "displayUsername" of relation "users" does ...
0
votes
1
answer
80
views
Earliest a client-side import can be executed in SvelteKit application?
Context
I have a Svelte 5 + SvelteKit application (App A) that is loaded into an iframe within a different app (App B).
When the iframe loads, App B emits a one-time message event with id=OBR_READY.
...
1
vote
1
answer
43
views
How to undo a refactor that altered base types in frontend framework?
I'm using Svelte 5 and TypeScript in VS Code.
I'm running into an issue where the TS language server thinks that the style attribute is not valid for a <div>, which is obviously incorrect. I'm ...
0
votes
0
answers
20
views
Svelvet edge source is undefined
<script>
import { Svelvet, Node, Edge } from 'svelvet';
// Make these reactive by declaring them with let
// let nodes = [
// {
// id: 'start',
// position: { x: 100, y: ...
1
vote
1
answer
106
views
Why not call a fetch function eagerly when it is not even awaited
I get this message in my terminal when running my svelte frontend:
Avoid calling fetch eagerly during server side rendering — put your fetch calls inside onMount or a load function instead
I ...
-1
votes
3
answers
316
views
Use Wasm on Vercel Edge
I'm trying to import a .wasm file on Vercel Edge in SvelteKit. The module I'm using is @resvg/resvg-wasm.
When I try like so:
import wasmInline from '@resvg/resvg-wasm/index_bg.wasm?inline';
...
await ...
0
votes
1
answer
85
views
CORS when redirecting with netlify
I have a SvelteKit project hosted on Netlify, and the idea is that if a user accesses the route mynetlifyproject.com/route, it should render content from another domain, specifically from app....
2
votes
2
answers
156
views
How to fetch on hover like SvelteKit in Next.js
I wrote a site in SvelteKit and the navigation between pages felt really fast because, SvelteKit on hover, runs the load functions of the pages, downloads everything to the client and on click, it ...
2
votes
1
answer
62
views
How can I update the client with information about the state of the currently active form request in sveltekit?
I am making a web app which sends some requests to external APIs which can take some time to complete. The user types information in a form, which is received by a +page.server.ts file in the default ...
0
votes
0
answers
24
views
loaders on storybooks autodocs
I have some storybook components with loaders. I am using svelte CSF. Individually they load the mock data and display properly, but on autodocs they appear as if the loader never fires.
<script ...
1
vote
1
answer
1k
views
Basic issue with Better-Auth
I'm trying to implement better-auth for a project. I've followed their great docs, but get 404 errors. Specifically, "GET http://localhost:5173/api/auth/get-session 404 (Not Found)" when I ...
1
vote
0
answers
101
views
Mocking components on the server side when running tests on a SvelteKit API using Vitest
I'm developing a SvelteKit application and I try to use Vitest to run some tests.
I want to test a simple API endpoint:
// src/routes/api/test/+server.ts
import { testService } from '$lib/server/...
0
votes
0
answers
49
views
Sveltekit breaks CSS on refresh page for child pages
I have an issue when reloading page in dev and production mode breaks CSS. I see that first page load sets body to 60% width while after reloading it sets to 100%. It happens only in child pages.
My ...
0
votes
0
answers
23
views
Getting Configuration Error in Sveltekith AuthJS for Provider Credentials
trying to implement AuthJS in Sveltekit with Twitch Provider and Credentials Provider. Twitch Provider is working.
But in Credentials where I want that the User can register with email username and ...
0
votes
1
answer
46
views
`onmouseenter` is not triggered
I have this piece of code:
<script lang="ts">
let visible = $state(false);
</script>
<div
role="button"
tabindex="0"
onmouseenter={() =>...
0
votes
0
answers
102
views
Returning an array from server-side to client-side in Svelte 5
I am using Svelte5. When I send an array from +page.server.js to +page.svelte it always works server-side and the array is sent as expected. However when +page.svelte is running on the client side ...