Why is post title and description exists inside of onMounr, but don't wne I...
When I render this page, I can see my post's properties in the console, but they disappear when I click the button. Why is that?<script lang="ts"> import { onMount } from 'svelte'; import type {...
View ArticleDownload and view images from Cloudflare R2
I am working on Sveltekit app using Typescript and want to display the images from R2, using workers R2 API, in the custom image component.The following is the .svelte code<script lang="ts">...
View ArticleHow 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 ArticlePlanethoster Svelte deployment
I have web site @planethoster with cPanel and simple Svelte app, how can i deploy it ?I copy all files after npm run build but i have white page.It's my first Svelte project and i'm not familiar with...
View ArticleGet top left corner coordinates of ``
I'm new to svetle, as a part of a project I need to calculate relative coordinated of a mouse click inside an image shown on screen.As the size of the screen is not constant, I need to calculate...
View ArticleSwitching components in Svelte/SvelteKit not working
I started learning Svelte yesterday as my first frontend Javascript framework, and I've been frustrated trying to fix one problem after another. Today, I have another problem I have been unable to...
View Articlevscode: suggestions not working on .svelte files
i have svelte official extension installed, at first it was working properly, but after i repaired my windows to a prior version the suggestion is not working (i think its called intellisence), for...
View ArticleSvelte subscribe to changes using github.com/joshnuss/svelte-local-storage-store
I am quite new to Svelte coming from an IOS background. I am currently trying to build a fairly simple application and am going around in circles trying to get my values to auto update when they are...
View ArticlePlaywright not waiting for elements to be visible
I'm trying to write a "hello world" test using Playwright to start testing my Svelte app. The app shows a loading screen for about two seconds, then shows the app itself, which shows some data in a...
View ArticleHow can one write unit tests for CSS in a Svelte component?
I have a HelloWorld Svelte component as below://// HelloWorld.svelte//<script> export let name = 'world';</script><h1>Hello {name}!</h1><style> h1 { background-color:...
View ArticlePUBLIC_BACKEND_SERVER_URL is not exported error During Docker Build Despite...
I'm working on a SvelteKit project and I'm encountering an issue where the PUBLIC_BACKEND_SERVER_URL environment variable, which I have defined in my .env file, is not being recognized during the...
View ArticleImport a surveyJS custom theme in svelte code
Morning,Since yesterday, I have been trying to add a custom theme by following the information given on the surveyJS site.I'm developing a site with svelte, I managed to import the form, but it's...
View ArticleSvelteKit: error when starting dev server: Error: write EOF / adapter-cloudflare
When trying to start a SvelteKit project of mine I am getting this error:C:\...\svelte-app>npm run dev> svelte-mvp@0.0.1 dev> vite deverror when starting dev server:Error: write EOF at...
View ArticleIs it possible to annotate the type of a Svelte component?
I have several Svelte components, for example: Melon.svelte, Cherry.svelte, Phone.svelte. In a parent component, FruitBox.svelte, using <svelte:component>, I want to be able to dynamically render...
View ArticleSvelteKitError: Not found: /undefined/get-paginated in Docker Container
I am encountering an issue with loading environment variable in my SvelteKit application when running it inside a Docker container. This question is extended from this questionThe error I'm seeing...
View ArticleWhy is my svelte app runs on localhost but NOT on AWS Lightsail?
I have a Dockerized Svelte application that runs perfectly on my local machine, but I’m having trouble deploying it on AWS Lightsail. Here’s what I’ve done so far:ErrorLog[3/Jul/2024:08:42:00]...
View ArticleIssue accessing components in Git subtree - Error: Cannot find module
I am encountering an issue while trying to access a component from a Git subtree in my Svelte project. Here’s a simplified view of my project structure:root- .subtree - imports - ui - Searchbar.svelte-...
View ArticleHow come I can't get my GET requests to work but I POSTS works fine?
I am working on my first webapp.I can sign up a user or log in a user and the user is stored in my database and a authentication token is generated when they log in.I can successfully have the user...
View ArticleStore with custom method and reactive values
I am building a Svelte component to display a list whose items can be added to a selection. The selection itself is a store:selectionStore.jsimport {writable} from 'svelte/store';function...
View ArticleDraw directly on an image in Svelte
I have an application that presents images. I need to let the user to click the image and to mark the specific place where they clicked.Below listed a simple example of the current code. Clicking the...
View Article