Closed
Description
Hello there! I'm having issue integrating stream chat into my react native expo app. When I start the integration, I get this error first
Android Bundling failed 31259ms node_modules/expo-router/entry.js (2996 modules)
The package at "node_modules/axios/dist/node/axios.cjs" attempted to import the Node standard library module "crypto".
It failed because the native React runtime does not include the Node standard library.
but I was able to bypass this using this code
// metro.config.js
const { getDefaultConfig } = require('expo/metro-config');
const config = getDefaultConfig(__dirname);
config.resolver.extraNodeModules = {
...config.resolver.extraNodeModules,
crypto: require.resolve('./shims/empty.js'),
};
config.resolver.resolverMainFields = ['browser', 'module', 'main'];
module.exports = config;
but then this created another error
"Android Bundling failed 14838ms node_modules/expo-router/entry.js (2975 modules)
ERROR node_modules/react-native-safe-area-context/lib/module/specs/NativeSafeAreaView.js: /Users/boluwatife/Desktop/apps/dojoconnect-v2/node_modules/react-native-safe-area-context/lib/module/specs/NativeSafeAreaView.js: Could not find component config for native component".
Steps to reproduce
- Add Stream Chat Wrapper in my _layout.tsx
If I remove stream chat from my project, my project works fine which implies that stream chat is the problem. Please provide any possible fix for me, Thank you!