Cannot find module './call-credentials' on Nuxt 3 SSR
safakdinc opened this issue · 5 comments
Reproduction
https://github.com/posva/nuxt--vuefire-example-spark-plan
Steps to reproduce the bug
You can just test it any vuefire project i guess. I just used vuefire spark plan template example and several fresh nuxt 3 projects. Just clone the repo and add your service-account.json file to root dir.
Expected behavior
Vuefire does support for ssr according to documents. So the expected behavior is the project can start.
Actual behavior
[nuxt] [request error] [unhandled] [500] Cannot find module './call-credentials'
Require stack:
- C:\Users\safak\Desktop\nuxt--vuefire-example-blaze-plan@grpc\grpc-js
This is the error message. I already try to install this dependency but it throws another cannot find module error. All errors just disappear when i switch ssr to false.
Additional information
My projects were working fine 2 days ago. I had the same problem with different computers and different dev environments. I haven't tried it on a different framework other than Nuxt, but I was able to initialize Firebase with a Node server in a Firebase project that only has an index.js file. So I'm pretty sure the problem is specific to Nuxt 3.
Hi, just discovered, we have the same problem here
I think it's because of the nuxt 3.15 versions. I tried to use previous versions with npm install nuxt@3.14.1592 --save-exact and it suddenly start working.
likely a duplicate of nuxt/nuxt#30749.
export default defineNuxtConfig({
$development: {
vite: {
ssr: {
noExternal: [
'@grpc/grpc-js',
'@grpc/proto-loader',
'faye-websocket',
'@vue/server-renderer',
]
}
},
},
compatibilityDate: '2024-11-01',