11

I'm getting this error :

C:/Users/Mobile/node_modules/@react-navigation/drawer/lib/module/views/ResourceSavingScene.js Attempted import error: 'shouldUseActivityState' is not exported from 'react-native-screens'. before i was able to do login authentication and now it says 405 error i don't know if this is related to this error or not.I'm creating project using react native expo.

jonrsharpe
  • 115,751
  • 26
  • 228
  • 437
Notation
  • 323
  • 6
  • 19
  • do you actually have a repro where you get this error in react-native? regarding web, this error is from ts-loader if you use it, and will go away if you use babel-loader instead – satya164 Oct 31 '20 at 17:19
  • @satya164 I have this error in web. how should I use babel-loader? I even don't know whether I'm using ts-loader or no – Mohammad Nov 02 '20 at 10:31
  • what are you using? CRA? see https://github.com/react-navigation/react-navigation/issues/8993#issuecomment-717233195 – satya164 Nov 02 '20 at 12:59
  • @satya164 I've seen this issue. Isn't babel-plugin-react-native-web enough? I'm using react-app-rewired – Mohammad Nov 02 '20 at 13:09
  • You need to make sure to use babel-loader like in the comment. – satya164 Nov 02 '20 at 13:12
  • Refer to this Github issue for more info https://github.com/react-navigation/react-navigation/issues/9129 – Saumyajit Parida Mar 10 '21 at 20:45

2 Answers2

0

Assuming you are using Expo 40,

I can confirm that per this comment on 'warnings printing to console for un-exported members of react-native-screens',
you can make the compile/console warning go away if you upgrade react-native-screens to newer version — if you are ok with expo warning you that your react-native-screens version number is out of range (Expo 40 wants screens version ~2.15.0, actual current version 2.17.x)

Daryn
  • 4,791
  • 4
  • 39
  • 52
0

upgraded expo to 41.0.1 and react-native-screens to 3.0.0 ~~removed warning

17Xamuel
  • 1
  • 1
  • 1