Please Help with react-native-device-info


#1

I’m a beginner in react native. I created a sample app with the expo. But i can’t import npm installed packages to code its shows an 500 error

import DeviceInfo from ‘react-native-device-info’; its shows an error like “unable to resolve react-native-device-info from screens\homescreen.js”


#2

Hey @rajath,

To use that library you need to run react-native link which isn’t possible with a standard Expo project. You’d have to eject and use ExpoKit which you can read about here:

Cheers,

Adam