vite server always return 'Not Found'

Created on 22 Sep 2020  路  8Comments  路  Source: vitejs/vite

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

[email protected] 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
upstream has workaround

All 8 comments

After checkout the source code. I found this problem is caused by [email protected]锛孖t works in [email protected]......

according to npm koa-compose latest is 4.1.0
it seems koa-compose 4.2.0 has been removed: https://github.com/koajs/compose/issues/106

wow, dom you legend, will check now

@LeoJiaXin i reinstall [email protected] and resolved it

i think this issue can be closed. the offending version of koa-compose is not available anymore and the fix is a simple reinstall.

Thanks!

after i install [email protected], it doesn't work yet

"dependencies": {
    "vue": "^3.0.0-rc.1"
  },
  "devDependencies": {
    "@vue/compiler-sfc": "^3.0.0-rc.1",
    "koa-compose": "4.1.0",
    "vite": "^1.0.0-rc.1"
  }

required Operating System: macOS Catalina 10.15.6
required Node version: 12.18.4
required Npm version: 6.14.6

@wulisensen

cd node_modules/vite

make sure that the package vite in node_modules depends on [email protected]

if you use yarn锛宎dd following config to your package.json

"resolutions": {
  "koa-compose": "4.1.0"
}
Was this page helpful?
0 / 5 - 0 ratings

Related issues

duanxianze picture duanxianze  路  3Comments

haikyuu picture haikyuu  路  3Comments

robrich picture robrich  路  4Comments

stefnotch picture stefnotch  路  3Comments

tbgse picture tbgse  路  4Comments