Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

failed to load config from vite.config.js #59

Closed
lapwat opened this issue Jun 14, 2021 · 8 comments
Closed

failed to load config from vite.config.js #59

lapwat opened this issue Jun 14, 2021 · 8 comments

Comments

@lapwat
Copy link

lapwat commented Jun 14, 2021

Description

Failed to load config when building.

Reproduction

yarn create @vitejs/app failed-to-load-config --template svelte-ts
cd failed-to-load-config
yarn
yarn dev

Error:

failed to load config from /tmp/failed-to-load-config/vite.config.js
error when starting dev server:
@dominikg
Copy link
Member

unfortunately the lastest breaking change in vite-plugin-svelte required an update to vites template. that was merged but not released

see this PR on how to update your project locally
vitejs/vite#3760

more info:
https://github.com/sveltejs/vite-plugin-svelte/blob/main/packages/vite-plugin-svelte/CHANGELOG.md#sveltejsvite-plugin-svelte

@lapwat
Copy link
Author

lapwat commented Jun 14, 2021

import { svelte } from '@sveltejs/vite-plugin-svelte';

Works well, thanks

@lapwat lapwat closed this as completed Jun 14, 2021
@patak-dev
Copy link

FYI, @vitejs/create-app v2.4.3 was just released including vitejs/vite#3760

@manadinho
Copy link

check your node version, it must be greater than v14.

@Zephni
Copy link

Zephni commented Oct 10, 2022

I have node v16.17.1 but am still getting this error. I noticed @lapwat posted "import { svelte } from '@sveltejs/vite-plugin-svelte';" as a solution of some kind but even after looking at the links provided I'm not sure where to put this or what to do next. It seems strange that I'm getting this error in an out of the box Laravel 9 install with everything up to date.

@dominikg
Copy link
Member

See https://github.com/sveltejs/vite-plugin-svelte#usage

Please note that this issue was raised a long time ago. Make sure you use the latest version of vite-plugin-svelte.
For questions how to integrate/use vite-plugin-svelte please use https://svelte.dev/chat #questions.It will be helpful if you provide a link to a repo with your setup when asking there.

@CodeLeom
Copy link

@Zephni

you can put that in your vite.config.js

@anroche
Copy link

anroche commented Jan 15, 2023

I have this issue because a try to setup a monorepo, but i don't pay attention a don't o have the same node version to my root package.json and in one of my package/workspace.

Pay attention to the versions of node you are using

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants