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

Vite.new/svelte or svelte-ts Failed to load config vite.config.js #344

Closed
razvn opened this issue Oct 7, 2021 · 2 comments
Closed

Vite.new/svelte or svelte-ts Failed to load config vite.config.js #344

razvn opened this issue Oct 7, 2021 · 2 comments

Comments

@razvn
Copy link

razvn commented Oct 7, 2021

Describe the bug

After generating the skeleton vite.new/svelte or vite.new/svelte-ts, npm run dev or vite fails with the error

failed to load config from /home/projects/vitejs-vite-menhuc/vite.config.js
error when starting dev server:
TypeError: Failed to fetch dynamically imported module: file:///home/projects/vitejs-vite-menhuc/vite.config.js?t=1633599395041

Link to the blitz that caused the error

https://stackblitz.com/edit/vitejs-vite-menhuc?file=vite.config.js&terminal=dev

Steps to reproduce

  • start a new project from http://vite.new/svelte-ts
  • the start fails with this error
  • trying to run npm run dev falis

Expected behavior

app should run

Screenshots

No response

Platform

Browser name  = Chrome 
Full version  = 94.0.4606.61
Major version = 94
navigator.appName = Netscape
navigator.userAgent = Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.61 Safari/537.36
performance.memory = {
  "totalJSHeapSize": 117502129,
  "usedJSHeapSize": 111446937,
  "jsHeapSizeLimit": 2172649472
}
Hash = 815bc8ad637b2ae02ff91b8c21f3a5f23f934bb6

Additional context

No response

@jrvidal
Copy link
Contributor

jrvidal commented Oct 7, 2021

Related: vitejs/vite#5213

@SamVerschueren
Copy link
Contributor

The issue @jrvidal linked was exactly the root cause of the error. It was fixed in Vite itself and therefore requires a newer version than specified in the project you linked. If you start a new project from https://vite.new/svelte-ts, you will notice that it works correctly now.

Let us know if you run into other issues 🙏 .

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

3 participants