fetch post is giving me undefined for the posted data?

Learning how to use Sapper. I have a component with form (the form has one field to enter an email address) and use fetch to post the data to the serverhandle. When I post the data and try to log...

svelte/sapper direct link problems on zeit/now - how to debug or fix?

In dev, I can direct link to any route. On Zeit/now, I can lead links to some pages but not others. I'm struggling to determine the problem. Here's an example, navigating straight to...

How to use rollup with sirv for a svelte app

unfortunately, I was not able to find anything in the rollup documentation. I am building a website with Svelte and rollup and need different environment variables for production, testing and...

Svelte 3: Could not import modules when unit testing

I'm trying to test a Svelte component with Jest. This component works fine in the browser, but unit test fails with importing modules. For example, when running Jest, import uuid from 'uuid'...

how to catch a server error in sapper (svelte)

I am translating my little website from express+handlebars to an express+sapper project. I would like to catch server side errors (for instance, a voluntary error when you go to /api/error) and...

Import `svelte-routing` in svelte

I have to build my svelte app but always have an error when trying to import 'svelte-routing' Uncaught Error: Module parse failed: Unexpected token (7:11) You may need an appropriate loader to...

Error 400 (Bad Request) while uploading image through python requests

I'm trying to upload an image to Sirv through python requests. Here is what I have so far; def upload_files(access_token, filename): endpoint = "https://api.sirv.com/v2/files/upload" headers =...

Too many errors on html-webpack-plugin when using typescript

I am starting a project using Webpack and typescript. But when I try to run the dev server I get a lot of errors on html-webpack-plugin. This is my output: > [email protected] dev...

API requests in svelte

I'm a bit new to svelte and javascript. I'm trying to build a page with many API components from external websites and I struggle a bit. I don't really know where to put the different bits of...

svelte 3 typescript: Unexpected tokensvelte(parse-error)

I'm new to svelte and I would like to try it with typescript by following the official guideline. I have generated the project and haven't done any change to my code. But I'm getting an (linting?)...

How can I connect socket.io to a Sapper app using an express server?

The Problem I'm trying to get socket.io up and running on a Sapper application using express and webpack. I have the site being served properly and without error, but when I try to hook up the...

How can i import additional files into server.js using sapper?

In my sapper app, i try to import a file into the server.js file like this: import sirv from 'sirv'; import polka from 'polka'; import compression from 'compression'; import * as sapper from...

Svelte with prettier/eslint

I am trying to make an app using svelte to try it out. I would like to setup prettier and eslint, I installed those dependencies and the extension for Svelte for VS Code. "dependencies": { ...

Sapper firebase hosting broken CSS and other asset links

I'm trying to host my sapper project in firebase and all my CSS and other asset links are broken because of baseUrl:/my-project-name/us-central1/ssr added by firebase. all asset links are...

Svelte build is inside a folder named public

In the default project of svelte, when you run start, the build folder contain all built js and css files. In my project, the result is the following. I checked my config, and it's pretty much...

Deploying Preact to Heroku

I've written a pretty simple app in Preact. No back end server, just front-end calling a web API and displaying the results. I set it up on Heroku and it reports that it deployed successfully, but...

How to deploy Svelte frontend with Node backend to Heroku?

I've created a small test app in svelte and want to push it live to Heroku. I haven't been able to figure out how to serve it up so that Heroku. I'm new to testing and trying these things on my...

Firebase deployng Sapper app as cloud function failed

The problem I'm building Sapper SSR app that loads content from Firebase storage based on data required from Firebase realtime database. My app is deployed on Firebase cloud functions. But last...

Cannot find module './App.svelte' or its corresponding type declarations

I have a setup that integrates electron with svelte along with typescript support. when I run the rollup script to compile svelte app, i am getting cannot find module ./App.svelte error as shown...

Svelte app build but can't access localhost

I am trying to setup an app with svelte and taiwlind. I have the following "scripts": { "watch:tailwind": "postcss public/tailwind.css -o public/index.css -w", "build:tailwind":...

Svelte Sapper retain session on page refresh (reload)

I've just recently started using svelte and sapper, and I'm trying to persist a stored session even when a user refreshes the page. (I hope this can be done). The idea is that a user can sign in,...

running svelte dev on https

I'm experimenting with svelte using it's template (https://github.com/sveltejs/template/) as starting point. And I wanted to scan qr codes with https://github.com/nimiq/qr-scanner, but on my pc I...

Sapper & Polka Authentication

I'm trying to create a simple authentication via arangodb (arangojs) using svelte & sapper as well as polka. So I'm fairly unexperienced in the node server stuff. In my login.svelte I'm sending a...

Different svelte variable value for npm run dev and npm run build

I'm developing a svelte+tailwind+PHP site with rollup.js. How can I set a variable in the svelte source files depending on if I'm running npm run dev or npm run build? I'd like the different...

How to add Sapper to existing Svelte project?

I have extensive applications in svelte, later I need to attach a sapper to it for further work, it is possibly? I try do it via: npm i @sapper but when I try to import something from this...

Hide raw .svelte files from developer tools in production

currently when i open developer tools in a browser i can see my raw svelte components i'd like to hide this information and send only the uglified code. this is what i get when open developer...

Accessing svelte store with $ notation causing Reference Error

I have a store.js file whose content is : import { writable } from 'svelte/store'; export const generateds = writable(0); console.log("generateds", $generateds) Each time I try to access...

Build error after updating Svelte: Package subpath './compiler.js' is not defined by "exports"

I was on Svelte version 3.0.0 and used npm i [email protected] to update to the most recent version. Now I can't get the app to run, I always get this errror: [!] Error: Package subpath...

`node : not found` when trying to `npm run dev`

I'm trying to run a Svelte example project on my Windows 10 system. I'm using Node v14.17.0 and npm v6.14.13. When I run npm run dev at the project level directory, I get the following...

Svelte - ReferenceError: buffer is not defined

Trying to setup a WebRtc connection in my new Svelte app, and am hitting this error whenever I try to import a library. ReferenceError: buffer is not defined Example Code:...