question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

vite server always return 'Not Found'

See original GitHub issue

when I run vite, the server returns a page with ‘Not Found’

koa@2.13.0 won’t recognize middleware after calling app.callback()

Reproduction

https://github.com/vitejs/vite/blob/master/src/node/server/index.ts#L63 the problem is: app.callback() called before all of app.use()

System Info

  • required vite version: 1.0.0-rc.4
  • required Operating System: macos 10.13.6
  • required Node version: 12.18.1

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
LeoJiaXincommented, Oct 12, 2020

@wulisensen

cd node_modules/vite

make sure that the package vite in node_modules depends on koa-compose@4.1.0

if you use yarn,add following config to your package.json

"resolutions": {
  "koa-compose": "4.1.0"
}
1reaction
zWingzcommented, Sep 25, 2020

@LeoJiaXin i reinstall koa-compose@4.1.0 and resolved it

Read more comments on GitHub >

github_iconTop Results From Across the Web

Troubleshooting - Vite
Vite cannot handle and does not support code that only runs on non-strict mode (sloppy mode). This is because Vite uses ESM and...
Read more >
Vue 3 + Vite dev server returns 404 on page reload of ...
I've isolated the problem to Vite. Everything works fine with Vue CLI. Checked vue-router history mode docs and in caveat section it says...
Read more >
Troubleshooting | Vite Ruby
First, verify that the dev server is reachable by starting a new console session and running: > ViteRuby.instance.dev_server_running? If it returns false ...
Read more >
Vite Headache - Endless 404 in console - Laracasts
I recently installed a new Laravel project and it now seems to have come with Vite instead of Webpack which is fine but...
Read more >
Configuring Vitest
vitest will read your root vite.config.ts when it is present to match ... Externalized dependencies will not be applied Vite's transformers ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found