Open peterpme opened 3 years ago
Hi @peterpme, sorry for the delay!
This package seems to have a node-heavy structure, and Snackager seems to not-like that. What happens in the module is that everything is split up into 4 different sub-modules. The module react-firebase-hooks
contains 4 different modules, in each folder. They aren't independently submitted as a package, instead, they rely on package.json
files within them.
react-firebase-hooks/auth
react-firebase-hooks/firestore
react-firebase-hooks/storage
react-firebase-hooks/database
The main problem that actually causes the error in Snackager is the invalid main
field in the root package.json
(pun intended). It points to ./dist/index.cjs.js
, but that doesn't exist, causing Snackager to being unable to find the entry point and bundle from there.
Importing react-firebase-hooks/auth
seems to work in Snackager, but because it requires react-firebase-hooks
as peer dependency, it's blocked because of the main
issue.
Summary
Adding
react-firebase-hooks
to a new Snack returns this error and making it unusable:What platform(s) does this occur on?
Android, iOS, Web
SDK Version
40/41
Reproducible demo or steps to reproduce from a blank project
Add
import "react-firebase-hooks"
to a new Snack. No import necessaryhttps://snack.expo.io/@peterpme/20b3d4