react-native-example icon indicating copy to clipboard operation
react-native-example copied to clipboard

Error when trying to run expo example

Open ghost opened this issue 4 years ago • 11 comments

Hi,

Unable to run the demo app from react native repo https://github.com/GetStream/react-native-example

I followed instructions, but I am facing index.js not found in package expo-activity-feed node modules.

Failed building JavaScript bundle. While trying to resolve module expo-activity-feed from file /Users/test/dev/react-native-example/App.js, the package /Users/test/dev/react-native-example/node_modules/expo-activity-feed/package.json was successfully found. However, this package itself specifies a main module field that could not be resolved (/Users/test/dev/react-native-example/node_modules/expo-activity-feed/src/index.js

ghost avatar Feb 28 '21 23:02 ghost

I having the same problem

EJohnF avatar Mar 02 '21 14:03 EJohnF

I have same problem

usupsuparma-solusi avatar Apr 06 '21 16:04 usupsuparma-solusi

Same problem. Refer to the screenshot below: image

codeyogi911 avatar Apr 18 '21 13:04 codeyogi911

I'm also having there same problem - running on apple silicon in case that is similar to others...

Thanks

stevenjohn avatar Jun 12 '21 06:06 stevenjohn

@vishalnarkhede any updates as we cannot test GS activity app to evaluate the service? Thanks

stevenjohn avatar Jun 12 '21 11:06 stevenjohn

seem to be having similar problem

krthush avatar Jun 24 '21 16:06 krthush

solution: upgrade expo-activity-feed with expo install expo-activity-feed before expo start or yarn start

younes0 avatar Jul 30 '21 16:07 younes0

i upgraded that package but then i got a dependency issue with react-native-screens which req. [email protected] (instead of 3.4).

then when i rolled it back to that version i get: undefined is not an object (evaluating client.currentUser.data) line 68 in StreamApp.js

jskye avatar Aug 01 '21 17:08 jskye

also updating to the latest react-native-screens (3.4) and updating the package.json to match i still get the same error with the client.currentUser.data

jskye avatar Aug 01 '21 17:08 jskye

@jskye did you run yarn run init-data and other commands as specified in README.md ? I also have to say that this demo is disappointing and I couldn't make other GetStream demos (with Expo only) work besides this one.

younes0 avatar Aug 01 '21 17:08 younes0

i did overlook to get and initialise the credentials and token. but now ive done it and still get the same error. even after redoing install, init, deploy. so not sure why its not finding the client.

TypeError: undefined is not an object (evaluating 'client.currentUser.data')

This error is located at:
    in StreamApp (at App.js:28)
    in RNCSafeAreaProvider (at SafeAreaContext.tsx:74)
    in SafeAreaProvider (at App.js:27)
    in App (created by ExpoRoot)
    in ExpoRoot (at renderApplication.js:45)
    in RCTView (at View.js:34)
    in View (at AppContainer.js:106)
    in RCTView (at View.js:34)
    in View (at AppContainer.js:132)
    in AppContainer (at renderApplication.js:39)

oh i just realised there was a bunch of things in step 2 i overlooked also. my bad.

jskye avatar Aug 01 '21 19:08 jskye