-
-
Notifications
You must be signed in to change notification settings - Fork 282
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
I followed steps in the SvelteKit installation, but when I run npm run dev, whatever what components are used, there is always an error of Unknown file extension ".svelte.... After the first load, the issue seems to be gone, but if I run npm run build and npm run preview to build the website, the error happens with 500 Cannot find package '/.../node_modules/@smui/button/'
For example when I used buttons, the error is:
Unknown file extension ".svelte" for /.../node_modules/@smui/button/dist/Button.svelte
To Reproduce
npm init svelte@next usersWhich Svelte app template? > Skeleton project, Use TypeScript? Yes- Follow steps here without dark mode support.
- Replace content in
index.sveltewith button example svelte
package.json
{
"name": "project",
"version": "0.0.1",
"scripts": {
"dev": "svelte-kit dev",
"build": "svelte-kit build",
"package": "svelte-kit package",
"preview": "svelte-kit preview",
"check": "svelte-check --tsconfig ./tsconfig.json",
"check:watch": "svelte-check --tsconfig ./tsconfig.json --watch",
"prepare": "npm run smui-theme",
"smui-theme": "smui-theme compile static/smui.css -i src/theme"
},
"devDependencies": {
"@smui/button": "^6.0.0-beta.4",
"@smui/card": "^6.0.0-beta.4",
"@sveltejs/adapter-auto": "next",
"@sveltejs/kit": "next",
"smui-theme": "^6.0.0-beta.4",
"svelte": "^3.44.0",
"svelte-check": "^2.2.6",
"svelte-preprocess": "^4.9.4",
"tslib": "^2.3.1",
"typescript": "^4.4.3"
},
"type": "module"
}svelte.config.js
import adapter from '@sveltejs/adapter-auto';
import preprocess from 'svelte-preprocess';
/** @type {import('@sveltejs/kit').Config} */
const config = {
// Consult https://github.com/sveltejs/svelte-preprocess
// for more information about preprocessors
preprocess: preprocess(),
kit: {
adapter: adapter(),
// hydrate the <div id="svelte"> element in src/app.html
target: '#svelte'
}
};
export default config;Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working