Flask Bad Request only when in production
I've recently implemented a reporting system for my website, I got it working on my laptop, but when I deployed it into vercel, it would give a "bad request" when using fetch. I don't think I'm doing...
View ArticleIs it possible to limit results from Svelte {#each} loop by a certain amount?
I'm using an {#each} loop to showcase data, but I'm curious if Svelte has a way to limit the results by an integer.For example, if I had the following array and loop:const object = [1, 2, 3, 4,...
View ArticleHow to bind Svelte Store when the value inside object?
I have a custom component InputGroup. It can render checkbox or radio type of input. The selected value is always Svelte Store. But the first store is top of scope, the second inside object. I use $:...
View ArticleHow can I dynamically import images stored in $lib within a component in Svelte?
I'm using an array of dummy data to test how I could display information from an api. In that data, I have a relative image path, for some images I've stored locally in $lib for simplicity in testing.I...
View ArticleSvelteKit Redirect 308 when trying to access internal API from +page.server.ts
I am trying to retrieve data from a local API endpoint route within my SvelteKit application. I can confirm the endpoint works by navigating directly to it at...
View Articlehow to fetch localStorage data on +page.ts with param.slug value in sveltekit...
I'm new to svelte and was trying to fetch localStorage data on +page.ts with params.slug value but when manually from address bar visited, the page doesn't fetch those data and results in 404.My data...
View ArticleHow do I create an inline Higher Order Component in SvelteKit 2.5?
I'm asking in general, but I'll give you an example use-case. On a particular page I'm building, I'm using the Helper component from Flowbite-Svelte. I keep finding myself using <Helper...
View ArticleHow to Use select in createQuery with Svelte Query to Process Fetched Data?
I'm using @tanstack/svelte-query with Svelte and want to process the data fetched by createQuery, similar to how select works in React Query's useQuery. How can I achieve this in Svelte?This code is...
View ArticleResponsive Grid Flex ish layout possible? [closed]
I try since days to get this working, but had no luck so far.I have a page that will run on different sized screens and has dynamic contents, i need something that will make use of the available space....
View ArticleCurrying Params, or, Component Factories in Svelte
I have a simple Svelte component <Greet /> which takes two params:<script lang=ts> export let greeting: string; export let name: string;</script><strong>{greeting},...
View ArticleHow can I deploy SvelteKit IO app with two ports?
I'm using the SvelteKit IO library for sockets in my SvelteKit application.My main application, when built, runs on port 4173. My socket runs on 3001.Here's the SKIO setup code: I can't change 3001 to...
View ArticleSvelte head components NOT rendered from Svelte-Kit server
Components inside <svelte:head> is not rendered by SSR.Steps to ReproduceSet up a basic svelte app using the following steps:npm create svelte@latest my-appcd my-appnpm installnpm run devThen go...
View ArticleHow do I add a dropdown options list in Exceljs?
I have a dropdown list in excel but exceljs isn't recognizing it when I import it. Is there some function I need to call to process formulae?Here's my svelte component which isn't handling dropdowns...
View ArticleHow can we debug exact svelte code when using rolloup
rollup.config.jsimport path from "path";import svelte from "rollup-plugin-svelte";import replace from "@rollup/plugin-replace";import resolve from "@rollup/plugin-node-resolve";import commonjs from...
View ArticleAdding a readable store to writable store
I'm trying to add a readable store as a default value to a writable store, so that the user will see some default value when he opens the app.I have one large readable store - taskStore, which contains...
View ArticleSveltekit Prop shows for a second then goes away
I'm definitely very new to this so apologies if it's a simple answer.// treatment.jsimport { writable } from 'svelte/store';export const treatment_uuid = writable('');export const treatment_name =...
View ArticleGetting npm run dev errors trying to work with Svelte
I'm trying to work through a Svelte starter project on MDN. I was able to run the first step of the project locally after using npx but when I tried to clone the Github repo I keep getting an error on...
View ArticleSvelte: Import by absolute path does not work
I'm trying to import enums, objects, functions, and svelte components by using absolute paths to files, but the compiler can't find them.This is how i do the imports:<script lang=ts> import {...
View ArticleNo longer able to import $lib files - ENOENT: no such file or directory
In my Svelte 5 / Sveltekit project, when I npm run build, I get the following error:[vite:load-fallback] Could not load "path\to\project\frontend\src\lib/types/pocketbase": (imported by...
View ArticleSession data seemingly not being sent from Express js server to Sveltekit client
everyone, so I finished building my web application and I deployed my server and frontend separately.So the problem seems to be that my server is not sending the session data to the client (that's what...
View Article