How to fix the error during Meteor running?
I have a front-end app in Svelte. We also use Meteor. When run: npm run dev, I get the following error:How can I fix it?
View ArticleHow to connect to Azure SQL database using the `mssql` package in Azure...
I have deployed an Azure Static Web App (SWA) using the Svelte framework. The SWA is connected to an Azure SQL database and uses the GraphQL endpoint to query the database. I want to replace the...
View ArticlePrevent focus event from firing when clicking a tree element?
The ARIA tree spec says that when the tree widget gets keyboard focus, then the first item should get focus (if no element has focus).I have implemented this behavior below, but when my click handler...
View ArticleIgnore Tailwind CSS dark attribute
I am building a simple web page in Svelte using shadcn-svelte. Some of the components they ship seem to add the dark attribute as a default to my HTML element during building which is something I do...
View ArticleHow to make global variable reactive in Svelte?
The following code does not run when I update the window.test variable, I do not have any log displaying on my console. I thought that test() would be run. Can't we make global variable reactive using...
View ArticleSvelte vs Angular vs React [closed]
What's the distinction between Svelte, Angular, and React in terms of code compilation? Specifically, Svelte compiles code to JavaScript at build time, akin to Angular. React also transforms code into...
View ArticlePassing a promise to addEventListener() in TypeScript?
On a sveltekit app, I am trying to create an event listener that executes an async function (a mutation) using Typescript.onMount(() => { document.addEventListener('keyup', handleKeyPress);});The...
View ArticleSvelte vs Angular vs React Compilation [closed]
What's the distinction between Svelte, Angular, and React in terms of code compilation?Specifically, Svelte compiles code to JavaScript at build time, akin to Angular.React also transforms code into...
View ArticleIs it possible to pass a Svelte store as a property on a component?
I’ve got a simple REPL example for a simple list-detail editor. It’s made up of three components:Annotation is the detailAnnotations loops through the data and creates Annotation instancesApp is the...
View ArticleHow do I get a live stream of data from a command line program in Rust?
I'm building a tauri desktop app around tshark and want to call out to the cli in Rust and pipe results back to the UI (svelte).THis is my main.rs in tauri:#![cfg_attr(not(debug_assertions),...
View ArticleAre dynamic imports at runtime in the browser (ESM) possible with Svelte?
Edit: I couldn't find a way so I exported the rendering outside the library that must be provided by the user in a callback.I'm updating a Svelte component/framework library (using Vite / Sveltekit)...
View ArticleSvelte 5: Passing state and derived values from children to parent (runes...
I have a parent component with multiple draggable Item-components which will be created dynamically in the final app. Inside each Item I calculate the current position as well as a derived offset...
View ArticleData prop responsiveness issue when input bind:value in Svelt
When export let data is an object, there is a data prop reactivity problem when using input bind:value.For example, in the following case<script>export let data = {name:"jack", age:31};$: man =...
View ArticleUncaught TypeError: Illegal constructor when creating svelte web component
I am trying to create a web component from a svelte project that uses the svelvet component library. I am using <svelte:options tag="my-element" /> in my App.svelte file and set customElement:...
View ArticleSveltekit form actions not returning data when invoked from different route
I'm having issues loading form action response data in Sveltekit, when the form is submitted from a different route to the server action.The Sveltekit app has the following structure:/lib...
View ArticleSvelte Checkbox input state does not match to html checkbox state
I am having problems with my custom checkbox component.My goal is for the parant to have control over the selected state of the input. But every time I click the checkbox it gets selected even if...
View ArticleHow to use Font Awesome 5 with Svelte/Sappe
I am writing a Server Side Rendered app with Svelte/Sapper and I am having trouble using Font Awesome fonts.I am using the following to load the font:<script> import Icon from "svelte-awesome";...
View ArticleUpdating steps of a StepProgress component
I'm learning svelteKit and I'm building a step progress using props so, this is my componente progressStep.svelte<script> export let steps = []; export let currentStep = 1; const isActive =...
View ArticleHow to add bootstrap module in a svelte JS app?
I'm very new to svelte ( like many of us ^^ ), and I didn't manage to add bootstrap to my app. Tried to run 'npm add bootstrap' but it said that I need peer jquery dependencie. Here is the terminal...
View ArticleHow to change page title dynamically in Sveltekit?
I'm learning SvelteKit and this might be a very elementary question. But I could not figure out how to change the tab's title.In my src/+layout.svelte I have:<script> let title="My Site...
View Article