Closed noook closed 10 months ago
I noticed the same issue just now, after upgrading to latest version
I think there is a bug report in Nuxt about this. It should work if you either install lru-cache yourself or use shamefully hoist option in npmrc
Indeed ! Linking it here just in case: https://github.com/nuxt/nuxt/issues/22077
I've got this issue too.
Linking it here just in case: nuxt/nuxt#22077
Thanks for linking this. I was trying to work out where the issue was coming from.
I think there is a bug report in Nuxt about this. It should work if you either install lru-cache yourself or use shamefully hoist option in npmrc
adding shamefully-hoist=true
to .npmrc
does not fix the issue. How exactly do I "install lru-cache yourself" ? Or, did anyone get nuxt-vuefire installed on latest Nuxt version 3.6.5 and it is working?
It does fix it with pnpm. You install it yourself with pnpm install lru-cache
. I have a sample app at https://github.com/posva/vuefire-nuxt-example where I keep testing things. It has everything working from app cache to auth with SSR. I plan on releasing templates very soon
It does fix it with pnpm. You install it yourself with
pnpm install lru-cache
. I have a sample app at https://github.com/posva/vuefire-nuxt-example where I keep testing things. It has everything working from app cache to auth with SSR. I plan on releasing templates very soon
Very good! That fixed it for me.
I look forward to your templates. It has been a long road for me in getting Firebase + nuxt to play nicely when it comes to SSR and auth.
It does fix it with pnpm. You install it yourself with
pnpm install lru-cache
. I have a sample app at https://github.com/posva/vuefire-nuxt-example where I keep testing things. It has everything working from app cache to auth with SSR. I plan on releasing templates very soon
Thanks, did the trick.
Started working on a project recently with Nuxt as the feature set is incredible. Using this library to work with firebase has been incredibly painful. I did get around this issue by installing the latest version of that dep manually but that only worked if I had already run the dev server once before to create the build output cache so that it could run again the next time. I realized this was a mistake once I went to deploy it into firebase because it would install everything from scratch in the cloud functions environment.
I will go with the suggested workaround for now and report back but I hope this can get resolved on the Nuxt end. Kind of a show stopper problem that's got me reconsidering the framework of choice unfortunately.
Has anyone been able to get the raw firebase sdk working with the firebase emulators while using the dev server? Seems like anytime a code change happens, and the firebase init code is configured for the emulators, there's a runtime error for attempting to reconfigure the firebase app. Seems like there's no clear/easy way to run startup code that's isolated from the rest of the app for development.
Reproduction
https://stackblitz.com/edit/nuxt-starter-gch51w?file=nuxt.config.ts
Steps to reproduce the bug
Expected behavior
The
__vite_ssr_import_1__.LRUCache is not a constructor
error should not appearActual behavior
Impossible to load any page with SSR enabled
Additional information
Node version: v18.14.2 NPM version: 9.5.0