I'm starting a brand new Expo project and following all docs as published on August 28, 2021. The import statement specified by the Firebase docs does not work. Here are the steps to reproduce.
expo init firebase-demo
Select blank (TypeScript) and hit enter.
cd firebase-demo
expo install firebase
Add this line to App.tsx, as the docs say:
import { getAuth, createUserWithEmailAndPassword } from "firebase/auth";
And you get this error: Module '"firebase/auth"' has no exported member 'getAuth'.
A clue as to what's going wrong is that in VS Code, if I command-click on "firebase/auth" it opens node_modules/firebase/empty-import.d.ts whose entire content is:
declare namespace empty {}
export = empty;
There is a node_modules/firebase/auth directory. Why isn't the import statement finding that?
Here's my tsconfig.json, which I have not modified from what expo init created:
{
"extends": "expo/tsconfig.base",
"compilerOptions": {
"strict": true
}
}