Checkbox missing in form data when using SvelteKit Superforms with Zod
I am trying to build a form using SvelteKit Actions, Superforms, Formsnap and Zod. But my checkbox is not working as expected.// schema.tsexport const formSchema = z.object({ ... private:...
View ArticleSvelte Component with Internal Store per Instance connected with Props?
I have a parent component with many descendant components that need to access its values, ideally those values come from props that the app using the parent component can supply. I finally managed to...
View Articleimport * as sass from 'sass' results in Maximum call stack size exceeded in...
I am having trouble with importing the sass module in a Svelte-Project using sveltekit and vite.I want to compile scss to css with typescript dynamically during runtime and decided to use this...
View ArticleVite build stuck on 'modules transform'
While building a svelte application with vite, the build process gets stuck on 'modules transform'. No error is reported on the building logs.I've tried several things, including but not limited...
View ArticleHow to use $app/navigation inside the vitest unit test
Getting this error in files where I am using $app/navigation:Error: Failed to resolve import "$app/navigation" from "src/utils/navigationUtils.js". Does the file exist?.Here is my setupTests.js file...
View ArticleIs it possible in sveltekit to create a folder based route with two dynamic...
I'm working on doing a 1:1 port of an existing svelte app that I created back around 2019 to svelte kit.I currently have a route defined like this where there are two slugs back to...
View Article`[File]` is stringified to `[object File]`
I am writing a file selection form that each time a file is selected, that file will be added to the existing file array. My intention is to submit that array via the form, but after submitting, the...
View Article[GSI_LOGGER]: The value of 'callback' is not a function. Configuration ignored
I'm migrating from Google Sign-in platform to the newer Google Identity Services library.App.svelte:<svelte:head><script src="https://accounts.google.com/gsi/client" async...
View ArticleError in svelte.config.js Syntax Error: Cannot use import statement outside a...
I setting up svelte.config.js like code below:import preprocess from 'svelte-preprocess';const config = { preprocess: preprocess(),};export default config;Suddenly, my Svelte codes keep getting error...
View ArticleVite refuses to use the correct build target in my Svelte / TS project
I'm creating a website using THREE.js, Svelte, Typescript and Vite. When I tried to test a new THREE.js feature (WebGPURenderer), I got the following error in the build step:[ERROR] Top-level await is...
View ArticleSveltekit development with workers KV -- hot reloading
Is it possible to use CloudFlare's Workers KV when developing a Svelte/kit application?It is possible to build the app then run wrangler dev when using the CloudFlare Workers adapter:npm buildwrangler...
View ArticleHow to run SvelteKit & Cloudflare Page locally?
I'm trying to create a new app using SvelteKit & Cloudflare Pages and I'm struggling with running the application locally in a proper manner. Currently, in order to get the app running locally I...
View ArticleSvelteKit doesn't deploy properly, what do I change?
I developed and app in SvelteKit, and I wanna deploy it as a static site. This is my SSG adapter configuration I got from the documentation.const config={ kit: { adapter: adapter({ // default options...
View ArticleSveltekit + Vite - Store not reacting properly when the file using it isn't...
I don't really know what the problem is, but here's the situation:I have a custom store containing an array getting its data from an API. In my main +page.svelte file, I initialise this store in...
View ArticleHow does this props passing method which includes a subscriber in the onMount...
I'm trying to use Monaco Editor in Svelte. I found this snippet online and it has an interesting way of defining the component. It looks like it declares this content object in the onMount phase which...
View ArticleRunning svelte dev on server
I am running svelte like this on my server:$ npm run dev Your application is ready~! π - Local: http://localhost:5000ββββββββββββββββββ LOGS ββββββββββββββββββWhich is great. However, when I try to...
View ArticleLoad basic Google Map with array of coordinates in SvelteKit
I am new to web development, so also SvelteKit. I am trying to show a Google Map with markers for a list of locations. The locations come from coordinates. I have found a few similar posts here and on...
View ArticleRunning standalone scripts and long-running applications with SvelteKit codebase
I have a SvelteKit project and'd like to run some maintenance scripts from the command line. I know how to run scripts with node. The maintenance scripts would refer modules in SvelteKit's $lib folder...
View Article@sveltejs/enhanced-img causes build to seg fail
When using Svelte's enhance image package, building locally on my M2 Mac works fine but not on Cloudflare pages server. I have tried increasing max old space memory but makes no difference.When I...
View ArticleScroll to svelte's element
I have a div that I want the page to scroll to when it is mounted. That div has an id which is determined in URL search params.Not sure why, when I call document.getElementById(#${referProductId}), the...
View Article