[nuxt] [request error] [unhandled] [500] Cannot find module’ vue/server-renderer/index.mjs’ (3.12.2)
I just build and start, after that I got some error
https://drive.google.com/file/d/14d0hZhJriMMBIZJ9BJVLl9Cs20MzM_yu/view?usp=sharing
Google Docs
Screen Recording 2024-07-26 at 14.55.25.mov
18 Replies
- 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: -
Got same issue today when deploying on AWS Amplify 😦
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)" 😅
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 :
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 🙂
I have same error
What your error message in terminal?
`
@Y@ sorry for ping
All good, try my solutions this one (if you are using yarn or npm!)
I am using yarn
Try it
"What version should I pass"? using exact same with your current version
Bro thanks a lot of
I changed version manualy
and its working currently
If u are using new version just use that version, The problem is not from vue. The problem is from nitro
I am write nuxi upgrade
and I taked error after this
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
thanks for your response
🙌