N
Nuxt5mo ago
Y@

[nuxt] [request error] [unhandled] [500] Cannot find module’ vue/server-renderer/index.mjs’ (3.12.2)

18 Replies
Y@
Y@OP5mo ago
- Operating System: Darwin - Node Version: v20.15.1 - Nuxt Version: 3.12.2 - CLI Version: 3.12.0 - Nitro Version: 2.9.7 - Package Manager: [email protected] - Builder: - - User Config: devtools, vite, css, modules, imports, routeRules, pwa, app, runtimeConfig, plugins, device, devServer, lodash, experimental, compatibilityDate - Runtime Modules: @pinia/[email protected], @pinia-plugin-persistedstate/[email protected], [email protected], @vite-pwa/[email protected], @bootstrap-vue-next/[email protected], [email protected], @nuxtjs/[email protected], @vueuse/[email protected], floating-vue/nuxt, [email protected] - Build Modules: -
LATEEK
LATEEK5mo ago
Got same issue today when deploying on AWS Amplify 😦
[nuxt] [request error] [unhandled] [500] Cannot find module '/var/task/node_modules/vue/server-renderer/index.mjs' imported from /var/task/chunks/routes/renderer.mjs
[nuxt] [request error] [unhandled] [500] Cannot find module '/var/task/node_modules/vue/server-renderer/index.mjs' imported from /var/task/chunks/routes/renderer.mjs
Y@
Y@OP5mo ago
I relized the issue is from nitro, nitro grab new vue version but we not yet using current vue version. So my temporary solving is: 1. create new folder with name "server-renderer" in the root app 2. create new command in package.json "cp:server-renderer": "cp -rn server-renderer .output/server/node_modules/vue/server-renderer", 3. and running this command after build nuxt. Note: "Sorry if my english was bad (begginer)" 😅
No description
No description
LATEEK
LATEEK5mo ago
Thanks for your feedback ! We we're kinda in the same situation, we can't use the last vue version as it generate bug. So we stick with 3.4.31, so we forced the module resolution in package.json like :
"pnpm": {
"overrides": {
"vue": "3.4.31"
}
},
"pnpm": {
"overrides": {
"vue": "3.4.31"
}
},
Y@
Y@OP5mo ago
you are using pnpm and I tried your solutions not working, but I'm using yarn and I tried this: "resolutions": { "vue": "3.4.31" } it worked also, so i can remove the command cp before. thanks 🙂
caldiran
caldiran5mo ago
I have same error
caldiran
caldiran5mo ago
No description
Y@
Y@OP5mo ago
What your error message in terminal?
caldiran
caldiran5mo ago
[nuxt] [request error] [unhandled] [500] Cannot find module '/Users/user/Desktop/repo/tb-monorepo/packages/frontend/.output/server/node_modules/vue/server-renderer/index.mjs' imported from /Users/user/Desktop/repo/tb-monorepo/packages/frontend/.output/server/chunks/routes/renderer.mjs
at new NodeError (node:internal/errors:405:5)
at finalizeResolution (node:internal/modules/esm/resolve:327:11)
at moduleResolve (node:internal/modules/esm/resolve:980:10)
at defaultResolve (node:internal/modules/esm/resolve:1193:11)
at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:404:12)
at ModuleLoader.resolve (node:internal/modules/esm/loader:373:25)
at ModuleLoader.getModuleJob (node:internal/modules/esm/loader:250:38)
at ModuleWrap.<anonymous> (node:internal/modules/esm/module_job:76:39)
at link (node:internal/modules/esm/module_job:75:36)
[nuxt] [request error] [unhandled] [500] Cannot find module '/Users/user/Desktop/repo/tb-monorepo/packages/frontend/.output/server/node_modules/vue/server-renderer/index.mjs' imported from /Users/user/Desktop/repo/tb-monorepo/packages/frontend/.output/server/chunks/routes/renderer.mjs
at new NodeError (node:internal/errors:405:5)
at finalizeResolution (node:internal/modules/esm/resolve:327:11)
at moduleResolve (node:internal/modules/esm/resolve:980:10)
at defaultResolve (node:internal/modules/esm/resolve:1193:11)
at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:404:12)
at ModuleLoader.resolve (node:internal/modules/esm/loader:373:25)
at ModuleLoader.getModuleJob (node:internal/modules/esm/loader:250:38)
at ModuleWrap.<anonymous> (node:internal/modules/esm/module_job:76:39)
at link (node:internal/modules/esm/module_job:75:36)
` @Y@ sorry for ping
Y@
Y@OP5mo ago
All good, try my solutions this one (if you are using yarn or npm!)
caldiran
caldiran5mo ago
I am using yarn
Y@
Y@OP5mo ago
Try it "What version should I pass"? using exact same with your current version
caldiran
caldiran5mo ago
Bro thanks a lot of
No description
caldiran
caldiran5mo ago
I changed version manualy and its working currently
Y@
Y@OP5mo ago
If u are using new version just use that version, The problem is not from vue. The problem is from nitro
caldiran
caldiran5mo ago
I am write nuxi upgrade and I taked error after this
Y@
Y@OP5mo ago
This issue also coming from ckeditor plugin like wiris, crop, etc. I'm using @ckeditor/ckeditor5-core v42.0.0, after while ago I'm running my app again. and I got some problem "ckeditor duplicate module". I open the error what coming from file is, And I check, The plugins using new version, So I pass all my plugins ckeditor to resolutions to keep version. Not just from nuxt side, from nextjs side exact same problem
caldiran
caldiran5mo ago
thanks for your response 🙌
Want results from more Discord servers?
Add your server