Giter Site home page Giter Site logo

Comments (12)

Schum123 avatar Schum123 commented on August 17, 2024 4

I will fix this. Hopefully this week.

from svelte-loading-spinners.

ulfaslak avatar ulfaslak commented on August 17, 2024 1

So the simple "fix" is that if you only need a few kind of spinners, you can simply copy the components into your project $lib/components and just import them from there. Bit of a sad hack but it works.

from svelte-loading-spinners.

ulfaslak avatar ulfaslak commented on August 17, 2024

How do you deal with it? Simply inserting those lines into the package.json of svelte-loading-spinners didn't change anything for me.

from svelte-loading-spinners.

dmdin avatar dmdin commented on August 17, 2024

I have the same issue. Are there any fixes before library update?
screenshot

from svelte-loading-spinners.

KaKi87 avatar KaKi87 commented on August 17, 2024

@Schum123 Any news on this ? Thanks

from svelte-loading-spinners.

Schum123 avatar Schum123 commented on August 17, 2024

I just tried this using latest SvelteKit and it works for me.

from svelte-loading-spinners.

KaKi87 avatar KaKi87 commented on August 17, 2024

Yet it didn't for me, that's precisely why I asked. Thanks

from svelte-loading-spinners.

Schum123 avatar Schum123 commented on August 17, 2024

@KaKi87 Could you send me you package.json?

from svelte-loading-spinners.

w3rafu avatar w3rafu commented on August 17, 2024

Hello, I am getting this error as well.

Here is my package config:
{
"name": "x",
"version": "0.0.1",
"private": true,
"scripts": {
"dev": "vite dev",
"build": "vite build",
"preview": "vite preview",
"check": "svelte-kit sync && svelte-check --tsconfig ./jsconfig.json",
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./jsconfig.json --watch"
},
"devDependencies": {
"@sveltejs/adapter-auto": "^2.0.0",
"@sveltejs/kit": "^1.20.4",
"prettier": "^3.0.2",
"prettier-plugin-svelte": "^3.0.3",
"svelte": "^4.0.5",
"svelte-check": "^3.4.3",
"svelte-loading-spinners": "^0.3.4",
"typescript": "^5.0.0",
"vite": "^4.4.2"
},
"type": "module"
}

from svelte-loading-spinners.

Rdk1229 avatar Rdk1229 commented on August 17, 2024

Getting this same issue...

5:10:56 PM [vite] Error when evaluating SSR module /src/routes/+page.svelte: failed to import "svelte-loading-spinners"
|- TypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension ".svelte" for D:\Webstorm_projects\project\node_modules\svelte-loading-spinners\Circle.svelte

Internal server error: Unknown file extension ".svelte" for D:\Webstorm_projects\project\node_modules\svelte-loading-spinners\Circle.svelte
{
code: 'ERR_UNKNOWN_FILE_EXTENSION'
}

from svelte-loading-spinners.

sirbots avatar sirbots commented on August 17, 2024

I got it working by just manually creating the component file I wanted, type file, and utils.ts file in my project.

from svelte-loading-spinners.

Tichss avatar Tichss commented on August 17, 2024

Instead of this:

import { Circle } from 'svelte-loading-spinners';

use this:

import Circle from 'svelte-loading-spinners/Circle.svelte';

from svelte-loading-spinners.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.