You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Operating System version: macOS Big Sur 11.5.1 (20G80)
Firebase SDK version: 9.0.2
Firebase Product: database
Node.js version: 16.7.0
NPM version: 7.20.3
Yarn version: 1.22.11
The problem
After the installation to the Next.js (v10.0.5) environment the project compiling fails with an error:
error - ./node_modules/firebase-admin/node_modules/@firebase/database/dist/index.esm.js
Attempted import error: '@firebase/app' does not contain a default export (imported as 'firebase').
I was only able to 'fix' it by changing import firebase from '@firebase/app' to import * as firebase from '@firebase/app' in ./node_modules/firebase-admin/node_modules/@firebase/database/dist/index.esm.js.
Is that the firebase-admin obsolete dependency issue?
Steps to reproduce:
Install the firebase-admin to the Next.js project: yarn add firebase-admin;
Run next dev server: yarn dev;
See that it won't compile because of the following error:
error - ./node_modules/firebase-admin/node_modules/@firebase/database/dist/index.esm.js
Attempted import error: '@firebase/app' does not contain a default export (imported as 'firebase').