`Uncaught TypeError: Error resolving module specifier...
I have the following error message in my browser upon using sveltekit and the command "npm run preview":Uncaught TypeError: Error resolving module specifier “.prisma/client/index-browser”. Relative...
View ArticleWhere does the :not(#\#):not(#\#) selector come from?
My css as written:/* .elevation-0 {} */.elevation-1 { box-shadow: var(--elevation-color-1) 0px 2px 1px -1px, var(--elevation-color-2) 0px 1px 1px 0px, var(--elevation-color-3) 0px 1px 3px...
View ArticleAstro, Typescript and svelte-check
I'm building a frontend project using Astro. For some dynamic components I added svelte as a UI framework.Now I want to integrate svelte-check but the command is failing because of: Type annotations...
View Articlestructure of output __data.json sveltekit
load in +layout.server.js generates */endpoint/__data.json. the structure looks like{"type":"data","nodes":[ {"type":"data","data":{ // some data }"uses":{"url":1 } }, null ]}For some reason i get null...
View ArticleHow to use Swiper JS method in Svelte
I want to use slideNext() method in Swiper JS. However, from the documentation of Swiper JS for Svelte, there is no example on showing how to access to method in Svelte. In React, there is a hook...
View ArticleSvelteKit 2 - How to use routes with and without slugs?
I'm using SvelteKit 2 to make a client-side rendered (CSR) progressive web app (PWA).I'd like to have routes like:https://myapp.com/somethinghttps://myapp.com/something/[slug]I've tried using the...
View ArticleUnable to differentiate between timeout and click on toaster notifications in...
I'm building an app using Svelte and Carbon Components (for Svelte). I'm trying to build an error notifications component which runs off an error store: When an error is thrown, a ToastNotification...
View ArticleDeploy Svelte and Supabase to Google cloud and supabase is unable to get the...
supabaseUrl required and unable to access the environment variable.[enter image description here](https://i.stack.imgur.com/ibded.png)[enter image description...
View ArticleEnable and disable scroll based on boolean in SvelteKit?
The problemIn SvelteKit, I am trying to disable and enable scroll when my side menu is opened. To do that, I am trying to utilize the {open} variable that is bound to my menu icon with...
View ArticleIs there a global JS / TS file that is loaded on server side and on client...
I'm looking for a global JS / TS file that is loaded before other files are loaded.One on the server side and one on the client size.Let's say before the page files are loaded.Does a global file like...
View ArticleUsing Stenciljs web component library with Svelte
I've been struggling to figure out how to use my StencilJS web component library with Svelte. Below is the best I can come up with. Which works, but I'm wondering if it's the "correct" way to do...
View ArticleSetting CSP (Frame Ancestors) in Single Page App
How do I set a Frame Ancestors CSP in a single page app using Webpack bundler? I know frame ancestors can't be set using a <meta> tag in my HTML.I've tried attaching the Content-Security-Policy:...
View ArticleHow do you implement file upload on a Svelte app that works on all resolutions?
So the problem I'm having is fairly niche, so I'm not sure if this has happened to anyone else. In a Svelte app I'm working on, I tried to implement simple file uploading. Here is my folder...
View ArticleSvelte (rollup) - Error: Unexpected token (Note that you need...
I am doing nothing to trigger this error. The app works fine one second, and doesn't the next.Why is this happening? It is not due to the missing @rollup/plugin-json plugin because it worked previously...
View ArticleConditional component in Svelte not rendering CSS
A generalized layout of my application is below, it's a directory where upon click of a person the directory goes away and displays more details on that person with a "close" button that reverts back...
View ArticleHow to create a "unified" component type from imported icon and own component...
I am using lucide-svelte for my sveltekit app. Besides those lucide icons, I have my own components that only have an element.My goal is to create a unified type that I can use for component props so...
View ArticleSvelte if-else connecting transitions
I have a page that has several stages, and I want to add transitions between them.{#if state === 1}<div class="red" transition:fade/>{:else if state === 2}<div class="blue"...
View Articleastro check fails with svelte-testing-library
I'm building a website with Astro together with Svelte. For component tests I added svelte-testing-library which runs fine when being executed with npm test.Unfortunately after adding component tests...
View ArticleHow can I reset the jsdom instance when using vitest in order to test a...
I'd like to do some integration testing of my svelte+page.js-based router using vitest, but I'm running into an issue where the jsdom instance only updates correctly once per test file.In the following...
View ArticleHow to change storybook base URL
does anyone know how to set up a different base URL for storybook? when you run "npm run storybook" it opens up on http://localhost:6006/, how can i get it to open up on http://localhost:6006/storybook/?
View Article