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 server 进行ssr服务端渲染时会报错 #287

Open
7 tasks done
sapphi-red opened this issue Oct 21, 2022 · 1 comment
Open
7 tasks done

创建多个 vite server 进行ssr服务端渲染时会报错 #287

sapphi-red opened this issue Oct 21, 2022 · 1 comment
Labels
feat: ssr invalid This doesn't seem right

Comments

@sapphi-red
Copy link
Member

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

@sapphi-red sapphi-red transferred this issue from vitejs/vite Nov 7, 2023
@edison1105
Copy link
Member

The reproduction seems valid.

1.yarn install
2.yarn run dev
3.访问 http://localhost:6173/test2/

There's nothing on the page.

@edison1105 edison1105 added invalid This doesn't seem right and removed pending triage labels Sep 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat: ssr invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

2 participants