Open
Description
Discussed in vitejs/vite#10567
Originally posted by yuntian001 October 21, 2022
Describe the bug
当我用官方的vue ssr demo,改为多个createServer ,不同url路由走不同的server ssr渲染逻辑时会报如下错误,但是页面可以正常展示。
[vite] Internal server error: ENOENT: no such file or directory, open '/test2/src/pages/Home.vue'
at Object.openSync (node:fs:585:3)
at Object.readFileSync (node:fs:453:35)
at getDescriptor (file:///D:/my/vite-vue-ssr/node_modules/@vitejs/plugin-vue/dist/index.mjs:86:10)
at Context.load (file:///D:/my/vite-vue-ssr/node_modules/@vitejs/plugin-vue/dist/index.mjs:2613:28)
at Object.load (file:///D:/my/vite-vue-ssr/node_modules/vite/dist/node/chunks/dep-4da11a5e.js:41084:46)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
Reproduction
https://github.com/yuntian001/vite-vue-ssr
Steps to reproduce
yarn install
yarn run dev
- 访问
http://localhost:6173/test2/
System Info
System:
OS: Windows 10 10.0.17763
CPU: (16) x64 Intel(R) Core(TM) i7-10700 CPU @ 2.90GHz
Memory: 6.44 GB / 15.86 GB
Binaries:
Node: 16.15.1 - C:\Program Files\nodejs\node.EXE
Yarn: 1.22.17 - ~\AppData\Roaming\npm\yarn.CMD
npm: 8.13.2 - C:\Program Files\nodejs\npm.CMD
Browsers:
Internet Explorer: 11.0.17763.771
Used Package Manager
yarn
Logs
No response
Validations
- Follow our Code of Conduct
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- Make sure this is a Vite issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to vuejs/core instead.
- Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
- The provided reproduction is a minimal reproducible example of the bug.