Skip to main content

All Questions

Tagged with
2 votes
2 answers
1k views

SyntaxError when building SvelteKit: The requested module 'intl-messageformat' is a CommonJS module

I'm getting the following error when building for production. Here's the output of npm run build running on Node v16.20.1 npm run build > [email protected] build > vite build vite v4.4.9 ...
Luca's user avatar
  • 31
0 votes
0 answers
87 views

How can I write a component for general use in modern frameworks

I want to write a chat component in Svelte (and SvelteKit), and make it available to everyone through npm. I want to use it in a React project. I researched it a bit but couldn't find any good answer ...
Ogulcan Bozkurt's user avatar
0 votes
1 answer
436 views

Interoperating web components from NPM modules with Svelte

I am building a basic Single Page App (SPA) using Svelte. I have been able to achieve basic layout and styling happily, and an asynchronous web request when you click a button. Now, my goal is to use ...
qqq's user avatar
  • 1,430
-1 votes
1 answer
190 views

How does importing module functions work when using npm in Svelte?

i don't understand how i properly use imports when working with Svelte and npm. This is a svelte component, which i can't get to work. Uncommenting "//import { Configuration, OpenAIApi } from &...
Nils's user avatar
  • 3
0 votes
1 answer
963 views

Unexpected option config.kit.methodOverride when running Svelte

I am currently in the middle of a Svelte project and updated to the latest version using the migration tools provided. However the project no longer interacts with npm. Running npm i will install node ...
OHello's user avatar
  • 97
0 votes
1 answer
780 views

Index.html shows blank page after building svelte(not kit) app with npm run build in svelte

But the npm run dev server shows the default counter app that is built. But when i build plain html css javascript with npm run build in dist folder. then run the index.html by clicking it, it shows ...
Krinjon's user avatar
  • 23
2 votes
1 answer
250 views

tabulatorTables is not defined (version 5)

Here's the documentation I installed the latest package 5.2.7 like this: npm i tabulator-tables --save I am importing it with this: import { TabulatorFull as Tabulator } from "tabulator-tables&...
Sir Rubberduck's user avatar
1 vote
1 answer
2k views

Importing a JS npm library in Svelte

I don't understand how to import a random npm library in Svelte. Take the scrapegoat library for example, a library to read CalDAV objects. I created a brand new Svelte project: $ npx degit sveltejs/...
Cimm's user avatar
  • 4,785
1 vote
0 answers
2k views

npm run dev doesn't auto-reload inside docker container

I've been struggling with a situation for the past day, and I couldn't really find anything that helped me solve it: I have a Svelte + Flask project that I've been running directly on my host for a ...
Lior Dahan's user avatar
2 votes
0 answers
181 views

Found non-callable @@iterator in sveltekit

Hi guys I got this error Found non-callable @@iterator on one page in my sveltekit code, everything worked before and I didn't change anything, how do I even start to debug this? I have this code at ...
isaac finkelstein's user avatar
1 vote
2 answers
699 views

Blank screen when running Sveltejs template on M1 MacBook Air

I am in the process of learning Sveltejs and until now I have been using https://svelte.dev/repl/ to go through the tutorial, which has been working perfectly. However, I wanted to develop and run ...
Pawel Zabinski's user avatar
0 votes
0 answers
77 views

How to create an extendable site with a JS framework (SvelteKit, Next, Angular, etc.)

I'm currently creating a site (in SvelteKit, but this generalizes to any framework) that will be extended into multiple different sites. The functionality is the same across all sites, but they'll ...
dominicm00's user avatar
  • 1,620
0 votes
1 answer
525 views

How do I stop the prettier dependency in node_modules overriding the project .prettierrc?

In the node_modules folder there is a prettier install (package.json says "version": "1.19.1",) that is overriding the .prettierrc in my project root. When I delete that dir, ...
monsto's user avatar
  • 1,250
22 votes
2 answers
6k views

Should a svelte package be a dependency or a devDependency?

I know that there are already a lot of posts concerning the distinction between dependency and devDependency but I didn't find any that explain it for the case of svelte so lets open this one here. In ...
johannchopin's user avatar
  • 14.9k
2 votes
5 answers
18k views

"npm run dev" Command Doesn't Work - Giving "missing script: dev" error

I was trying to run this SVELT GitHub repo on local server: https://github.com/fusioncharts/svelte-fusioncharts I tried to launch it with "npm run dev" command. But I am seeing this error: ...
Md. Ehsanul Haque Kanan's user avatar

15 30 50 per page