Firebase web 9.0.1 error Package path . is not exported
I've installed [email protected]
, using yarn. The package seems working fine but it gives an error just after running yarn install
as given.
Module not found: Error: Package path . is not exported from package /Users/trinity/Projects/hello/node_modules/firebase (see exports field in /Users/trinity/Projects/hello/node_modules/firebase/package.json)
Just for reference, attaching the installed set of libraries here.
➜ hello git:(main) ✗ yarn list --depth=0 | grep firebase
├─ @firebase/[email protected]
├─ @firebase/[email protected]
├─ @firebase/[email protected]
├─ @firebase/[email protected]
├─ @firebase/[email protected]
├─ @firebase/[email protected]
├─ @firebase/[email protected]
├─ @firebase/[email protected]
├─ @firebase/[email protected]
├─ @firebase/[email protected]
├─ @firebase/[email protected]
├─ @firebase/[email protected]
├─ @firebase/[email protected]
├─ @firebase/[email protected]
├─ @firebase/[email protected]
├─ @firebase/[email protected]
├─ @firebase/[email protected]
├─ @firebase/[email protected]
├─ @firebase/[email protected]
├─ @firebase/[email protected]
├─ @firebase/[email protected]
├─ @firebase/[email protected]
├─ @firebase/[email protected]
├─ @firebase/[email protected]
├─ @firebase/[email protected]
├─ @firebase/[email protected]
├─ @firebase/[email protected]
├─ @firebase/[email protected]
├─ @firebase/[email protected]
├─ @firebase/[email protected]
├─ @firebase/[email protected]
├─ @firebase/[email protected]
├─ @firebase/[email protected]
├─ @firebase/[email protected]
├─ @firebase/[email protected]
├─ @firebase/[email protected]
├─ @firebase/[email protected]
├─ @firebase/[email protected]
├─ @firebase/[email protected]
├─ @firebase/[email protected]
├─ [email protected]
➜ hello git:(main) ✗
The development environment is an electron, I'm using ERB template for the project. Yarn installs the dependency fine, the problem appears in the post-install script. Please leave any clue for resolution. Thanks
Solution 1:
Try this:
import * as firebase from "firebase/app"
Found here: https://stackoverflow.com/a/68984595/903000