Unable to resolve "expo-constants"

I wanted to use device ID for my project so after little search found out the way to use expo constants.
So I installed it from following link Constants - Expo Documentation
But then soon I realized that It wasn’t needed since expo already bunled it. So I tried uninstalling it.
Now I am getting

Unable to resolve “expo-constants” from “node_modules\expo-asset\src\Asset.js”

Can anyone explain what is going wrong here.
Tried cleaning cache, deleting node modules, resetting
but error still persist.

Hi @sannyabs! As it says in the docs, in managed projects you’ll need to run expo install expo-constants

Let me know if the issue still pops up even after doing that

I think issue occured when I installed expo-constants.
managed to resolve it by installing “react-native-unimodules”: “^0.4.0” and “@unimodules/react-native-adapter”: “^2.0.1”,
Strange but it worked.

2 Likes

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.