rfabien
rfabien

Reputation: 21

Sveltekit adapter-static fails: Cannot read property 'kit' of undefined

I'm trying to build a Sveltekit site using the adapter-static. npm run preview works fine and npm run build seems to build fine before giving me a cryptic error:

Cannot read property 'kit' of undefined.

Can you point me towards a way to debug this - I cannot find where exactly the issue is.

Upvotes: 2

Views: 1419

Answers (2)

mewa
mewa

Reputation: 1552

Svelte is still under active development. Most likely you're trying to use the latest documentation while having the older Svelte dependencies installed locally.

Upgrading your Svelte dependencies should solve the problem.

Upvotes: 1

Alfred
Alfred

Reputation: 7091

Try to create a new project with a fresh install of SvelteKit and adapter-static and then copy your code from the old project. That worked for me. Seems like the two were out of sync.

Upvotes: 0

Related Questions