Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

config.kit.adapter should be an object with an "adapt" method

I want to use the @sveltejs/adapter-static in my Svelte Kit app (want to turn it into an SPA). I installed the adapter static with npm i @sveltejs/adapter-static.

The code in the svelte.config.cjs looks like this

kit: {
    // By default, `npm run build` will create a standard Node app.
    // You can create optimized builds for different platforms by
    // specifying a different adapter
    adapter: adapter({
        fallback: 'app.html'
    }),

When I start my app with npm run dev I get the following error: config.kit.adapter should be an object with an "adapt" method

How can I fix this?

like image 971
Fugi Avatar asked Sep 12 '25 01:09

Fugi


1 Answers

just install it with the following command:

npm i -D @sveltejs/adapter-static@next

credits goes to: https://github.com/GrygrFlzr

like image 184
Trichter Avatar answered Sep 14 '25 16:09

Trichter