Closed kadiryazici closed 3 years ago
If you use @vitejs/plugin-legacy in the project and try to build server, this error occures
@vitejs/plugin-legacy
A:\Desktop\VUE\kyzc-portfolio\node_modules\.pnpm\vite-ssr@0.10.6_1875ae38a9ea4201aa9b0ba5cafe20a3\node_modules\vite-ssr\build\index.js:20 const indexHtml = clientResult.output.find((file) => file.type === 'asset' && file.fileName === 'index.html'); ^ TypeError: Cannot read property 'find' of undefined at module.exports (A:\Desktop\VUE\kyzc-portfolio\node_modules\.pnpm\vite-ssr@0.10.6_1875ae38a9ea4201aa9b0ba5cafe20a3\node_modules\vite-ssr\build\index.js:20:43) at processTicksAndRejections (node:internal/process/task_queues:96:5) at async A:\Desktop\VUE\kyzc-portfolio\node_modules\.pnpm\vite-ssr@0.10.6_1875ae38a9ea4201aa9b0ba5cafe20a3\node_modules\vite-ssr\cli.js:19:9 ERROR Command failed with exit code 1.
Legacy compiles client side values correctly but it tries to compile server too.
This was mentioned in https://github.com/frandiox/vite-ssr/discussions/58
@johnRivs I managed to reproduce the issue finally 😅
If you use
@vitejs/plugin-legacy
in the project and try to build server, this error occures