Module not found: Can't resolve 'react-native'

I get this error despite having react-native in my package.json.

Module not found: Can't resolve 'react-native' in 'C:\Users\hille\Desktop\virusattack\src\components'

Although when I run react-native info , it show me these.

image

Is it because of npm global package causeing this error? How to fix?

1 Like