Nino Keldishvili
Nino Keldishvili

Reputation: 41

Could not detect a supported production environment

I am trying to deploy sveltekit app on fleek, using adapter-auto. and getting the error

2:02:38 PM 03/01/2023: > Using @sveltejs/adapter-auto 2:02:38 PM 03/01/2023: Could not detect a supported production environment. See https://kit.svelte.dev/docs/adapters to learn how to configure your app to run on the platform of your choosing 2:02:38 PM 03/01/2023: ✔ done 2:02:39 PM 03/01/2023: An error occured during upload: Public directory does not exist. 2:03:03 PM 03/01/2023: Error occured during the upload.

This is my svelte.config.js

import adapter from '@sveltejs/adapter-auto';
import { vitePreprocess } from '@sveltejs/kit/vite';

/** @type {import('@sveltejs/kit').Config} */
const config = {
    kit: {
        adapter: adapter()
    },
    preprocess: vitePreprocess()
};

export default config;

I also tried other adapters that the documentation (https://kit.svelte.dev/docs/adapters) suggests but nothing works. Actually i'm not sure which one i should use or do i have to write my own?

Upvotes: 4

Views: 2741

Answers (1)

Akabrando
Akabrando

Reputation: 302

Try to change the first line of svelte.config.js as below

import adapter from '@sveltejs/adapter-node';

Also make sure you have installed the adapter using

npm i -D @sveltejs/adapter-node

Upvotes: 3

Related Questions