Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error installing react-native-firebase/storage......."`@react-native-firebase/app/lib.common does not exist in the Haste module map`"

I installed package "react-native-firebase/storage" as per git instructions (npm install @react-native-firebase/storage --save)

Then I imported package with "import rnFb from '@react-native-firebase/storage'";

However its giving me the error "@react-native-firebase/app/lib.common does not exist in the Haste module map"

Ive tried the instructions given on error message..but to no avail

1. Clear watchman watches: `watchman watch-del-all`.
  2. Delete the `node_modules` folder: `rm -rf node_modules && npm install`.
  3. Reset Metro Bundler cache: `rm -rf /tmp/metro-bundler-cache-*` or `npm start -- --reset-cache`.
  4. Remove haste cache: `rm -rf /tmp/haste-map-react-native-packager-*`.

Can anyone help? Thanks

UPDATE 11/20 @react-native-firebase/storage folder in present in node_modules folder....however "app" folder is not (which is what the error appears to be complaining about)

like image 849
james murphy Avatar asked Jun 14 '26 08:06

james murphy


1 Answers

cd into your project directory. Install app package first by, yarn add @react-native-firebase/app Then install storage package by yarn add @react-native-firebase/storage. Then execute yarn install and the installed packages will be linked to the project.

You can verify the installation by checking package.json file. Dependencies in package.json should be as follows.

"dependencies": { "@react-native-firebase/app": "^6.0.4", "@react-native-firebase/storage": "^6.0.4", "react": "16.9.0", "react-native": "0.61.4", "react-native-gesture-handler": "^1.5.0", "react-navigation": "^4.0.10" },

like image 111
Sandun Menaka Jayawardhena Avatar answered Jun 17 '26 23:06

Sandun Menaka Jayawardhena



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!