Vite SSR dev bundler transpile error by using firebase-admin sdk
See original GitHub issueEnvironment
- Operating System:
Darwin
- Node Version:
v16.13.0
- Nuxt Version:
3.0.0-rc.1
- Package Manager:
yarn@1.22.17
- Builder:
vite
- User Config:
-
- Runtime Modules:
-
- Build Modules:
-
Reproduction
Use the firebase-admin sdk with latest version of nuxt rc1:
https://github.com/DevJoghurt/nuxt3-firebaseadmin
Describe the bug
This bug seems to be related to this fix:
https://github.com/nuxt/framework/pull/4371
Additional context
No response
Logs
[nuxt] [request error] Cannot read properties of undefined (reading 'SDK_VERSION')
at $id_9d001d45 (./.nuxt/dist/server/server.mjs:2616:51)
at async __instantiateModule__ (./.nuxt/dist/server/server.mjs:3809:3)
Issue Analytics
- State:
- Created a year ago
- Reactions:4
- Comments:21 (8 by maintainers)
Top Results From Across the Web
Server-Side Rendering - Vite
Vite provides built-in support for server-side rendering (SSR). The Vite playground contains example SSR setups for Vue 3 and React, which can be...
Read more >ts-node error [err_require_esm]: require() of es module
to use the import syntax and import node-fetch , but then you can't use require for any other packages. You need to work...
Read more >vite-plugin-ssr
With vite -plugin-ssr , you integrate tools manually and keep architectural control. Learn more.
Read more >How to configure vite/rollup to exclude firebase-admin from my ...
Basically I just want a clean setup with this simple stack: firebase functions; vite + SSR (using vite-plugin-ssr ); preact and typescript. > ......
Read more >Vite in 100 Seconds - YouTube
Vite is a JavaScript build tool that makes it faster and easier to build web applications. It's similar to tools like Webpack, but...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Same here
Here’s that specific line
firebase-admin
exports esm tooStarting with
nitropack@0.4.4
andunenv@0.5.2
, we are using a cross-version compatible ofnode-fetch
(unjs/node-fetch-native) that should resolve the issue when multiple versions ofnode-fetch
exist in a project.Please use
npx nuxi upgrade --force
to receive this update.However, I think there are more things attached to this issue so keeping it open.