react-native-safe-area-context icon indicating copy to clipboard operation
react-native-safe-area-context copied to clipboard

Unable to resolve module NativeSafeAreaView

Open anthowm opened this issue 4 years ago • 14 comments

Today I update to last version 3.1.1 and got this issue in both platforms. I tried manual linking and not working. Finally check that in node_modules missing this module Screenshot 2020-07-21 at 10 29 15

anthowm avatar Jul 21 '20 08:07 anthowm

I have exactly the same issue.

mununki avatar Jul 21 '20 16:07 mununki

Same here

paulg0614 avatar Jul 22 '20 14:07 paulg0614

npm start -- --reset-cache fixed it for me

woltsu avatar Jul 23 '20 16:07 woltsu

Still getting this issue with 3.1.4, the fix above didn't work for me...

steveZak avatar Aug 12 '20 23:08 steveZak

npm start -- --reset-cache did not fix it for me. watchman del-all did nothing. I reinstalled node_modules, nothing.

Indeed the file NativeSafeAreaView is not present in node_modules

I will downgrade and let you guys know.

wmonecke avatar Aug 16 '20 11:08 wmonecke

@janicduplessis

wmonecke avatar Aug 16 '20 11:08 wmonecke

Current solution:

  1. Go to node_modules/react-native-safe-area-context/src/index.tsx

  2. Add this export statement: export * from './NativeSafeAreaProvider'

  3. npm start --reset-cache

  4. Keep working.

wmonecke avatar Aug 16 '20 11:08 wmonecke

This file doesn't exist anymore (https://github.com/th3rdwave/react-native-safe-area-context/tree/master/src). Would it be possible that you have multiple versions of the library installed? Also you can check what version is actually installed by checking the package.json file "version".

janicduplessis avatar Aug 19 '20 18:08 janicduplessis

Having the same problem and I'm sure I'm using the latest react-native-safe-area-context version.

comvenger-brandon avatar Oct 23 '20 17:10 comvenger-brandon

I was using expo and this woked for me

expo start -c

walosha avatar Nov 10 '20 14:11 walosha

npm start -- --reset-cache was enough for me

florian-milky avatar Feb 02 '21 13:02 florian-milky

Using 3.2.0 and npm start -- --reset-cache works for me.

FanchenBao avatar Jul 25 '21 21:07 FanchenBao

Using 3.3.2 and npm start -- --reset-cache also worked for me

ghasemikasra39 avatar Oct 20 '21 13:10 ghasemikasra39

Current solution:

  1. Go to node_modules/react-native-safe-area-context/src/index.tsx
  2. Add this export statement: export * from './NativeSafeAreaProvider'
  3. npm start --reset-cache
  4. Keep working.

Thank you for this , it did work for me

karim-belhadjali avatar Jan 11 '22 15:01 karim-belhadjali

This is for v3 of the library, and we're on v4. Please re-open a new issue if you're still facing issues

jacobp100 avatar Jan 19 '23 16:01 jacobp100