Several months ago, I created a Vue 3 project using Vite and everything was running smoothly. However, today when I tried to make a small modification, an error occurred at runtime. All Vue files are showing the same error message:
[vite] Internal server error: Failed to resolve import "@vue/server-renderer" from "src/App.vue". Does the file exist?
. Despite my global search, no file seems to reference vue/server-renderer
. How can I resolve this issue?
[vite] Internal server error: Failed to resolve import "@vue/server-renderer" from "src\App.vue". Does the file exist?
Plugin: vite:import-analysis
File: PATH/vue3-element-admin/src/App.vue
17 |
18 | import { resolveComponent as _resolveComponent, withCtx as _withCtx, createVNode as _createVNode, mergeProps as _mergeProps } from "vue"
19 | import { ssrRenderComponent as _ssrRenderComponent } from "@vue/server-renderer"
| ^
20 |
21 | function _sfc_ssrRender(_ctx, _push, _parent, _attrs, $props, $setup, $data, $options) {
at formatError (PATH\vue3-element-admin\node_modules\vite\dist\node\chunks\dep-0351185a.js:36769:46)
at TransformContext.error (PATH\vue3-element-admin\node_modules\vite\dist\node\chunks\dep-0351185a.js:36765:19)
at normalizeUrl (PATH\vue3-element-admin\node_modules\vite\dist\node\chunks\dep-0351185a.js:73694:26)
at async TransformContext.transform (PATH\vue3-element-admin\node_modules\vite\dist\node\chunks\dep-0351185a.js:73834:57)
at async Object.transform (PATH\vue3-element-admin\node_modules\vite\dist\node\chunks\dep-0351185a.js:36985:30)
at async doTransform (PATH\vue3-element-admin\node_modules\vite\dist\node\chunks\dep-0351185a.js:52057:29)