Category "sveltekit"

Call fetch in sveltekit endpoint

if i call fetch("http://localhost:3000/api/verify") POST in endpoint, i got FetchError: request to http://localhost:3000/api/verify failed, reason: connect ECON

Failed to resolve entry for package "material-symbols"

After installing material-symbols using npm the following message is shown in the console My steps Run in the console npm i material-symbols@latest Add import '

How do I tail logs from Cloudflare pages, when I have deployed a Sveltekit application using the '@sveltejs/adapter-cloudflare' package?

I have deployed a SvelteKit project to Cloudflare pages, using the @sveltejs/adapter-cloudflare package. My svelte.config.js file looks like this: import prepro

rollup run dev aborts

I'm working in a Svelte project with rollup. After working for a while, when I try to restart de project in production to see the changes and I write 'npm run d

How to handle sessions securely in SvelteKit

I'm fairly new to SvelteKit and I'm wondering how to properly handle sessions. From what I understand a unique session ID is typically stored in the browser as

SvelteKit - Deployment - @sveltejs/adapter-static not updating static paths in fallback page

I'm exploring SvelteKit for the first time, I built my simple first application and I'd like to deploy it to my Apache server as a static page As far as I under

Styling issues in monorepo with Turborepo, SvelteKit and Tailwind

I’ve created a monorepo with Turborepo that contains 2 SvelteKit apps and 2 packages: a component library (which is also based on SvelteKit) and a configu

SvelteKit API requests with Axios JWT authentication

I am creating an app with a SvelteKit client and a Laravel API stack, but I am struggling to safely authenticate my client to my API. Ideally I want to store a

Svelte reactive statement with a variable fron onMount

I'm trying to style the currently active tab of my web project with the class "active". To target my tab elements I am using onMount(() => { const li

How to use dotenv in SvelteKit project?

I'm trying to use dotenv.config() in a SvelteKit project. I can run npm run build successfully. But when I try to start the server (using node build), it throws

Svelte - Not able to fetch data from JSON file during jest unit testing

During unit testing, I am getting undefined error, while executing svelte component with json file. Restaurant.svelte : import data from '../Data/restaurants.js

SvelteKit could not resolve dependency even though it's external

I'm making a user authentication page and in that matter, I'm using bcrypt for hashing. Everything was nice and well until I actually use the bcrypt module in t

SvelteKit and caching the component output in server-side rendering

I have a SvelteKit landing page component that calculates and displays statistics. Because crunching the numbers out from the database is a heavy job, and this

Sveltekit how do I set checkboxes checked based on query params?

I am trying to set checkboxes active based on query parameters using Sveltekit. To achieve this, I tried to get all route query parameters using the 'url.search

How do I deploy a sveltekit app to a dfinity container?

Difinity is a blockchain container. I need a rock solid example on how to deploy a standard sveltekit app to it. Their web page doesn’t cover sveltekit ht

How to use Tailwind Elements in Sveltekit

I'm trying to use a simple Tailwind date picker component in a svelte kit app, however the calendar popup is not appearing. I assume it has something to do with

static adapter not working with nginx and refreshing pages

This is my config: import adapter from '@sveltejs/adapter-static'; import preprocess from 'svelte-preprocess'; import path from 'path'; /** @type {import('@sve

Sveltekit communication between layout, routes and components

I'm trying to move a svelte SPA into Sveltekit. In my SPA, the communication schema is what I would call a "controller component" which takes care of displaying

Svelte/SvelteKit: Dynamic import of components with variable

I want to dynamically import components without importing a specific component. I want to set the component name with a variable, received from the store: <s

How to route programmatically in SvelteKit?

I want to be able manage history of my SvelteKit app while simultaneously making sure the whole routing system of SvelteKit doesn't get affected in any way. Som