React-native-reanimated: Unable to resolve "./useValue"
Asked Answered
S

2

5

I am trying to build a react native app. I have caught an error on the terminal saying

Unable to resolve "./useValue" from "node_modules\react-native-reanimated\src\Animated.js"

I reinstalled react-native-reanimated to the expected version range.

`Some of your project's dependencies are not compatible with currently installed expo package version:

  • react-native-reanimated - expected version range: ~1.9.0 - actual version installed: ^1.10.1 Your project may not work correctly until you install the correct versions of the packages. To install the correct versions of these packages, please run: expo install [package-name ...]`

Thus, I run the code as follow: npm install [email protected], but still run into the error code.

I could realy use some help on this.

Sauer answered 2/8, 2020 at 10:55 Comment(0)
H
7

try uninstalling the package ==> close ide (all instances) ==> open the ide ==> install the package again ==> run "expo start -c"

Hamlani answered 2/8, 2020 at 11:28 Comment(6)
I already did that... I even removed react-native-reanimated completly and reinstalled the 1.9.0 versionSauer
try: uninstalling the package ==> close ide (all instances) ==> open the ide ==> install the package again ==> run "expo start -c"Hamlani
It worked, thank you very mutch! What is the difference between "expo start -c" and simply "expo start" on the cmd?Sauer
Works like a charm! Tnx.Hagood
I tried uninstalling and reinstalling, clearing cache, deleting node-mod's/package-lock etc - even stepped it back to version react-native-reanimated: 1.7.0 - still no luck. I am being advised this file is missing: node_modules/react-native-reanimated/src/Animated.js - checked node modules after each install and it's not there. Weird.Mozellamozelle
After uninstalling the package and before closing ide's try the 'npm prune' commandHamlani
M
4

Only do this:

expo start --clear

From Expo Documentation at Expo Start command.

--clear, -c | Clear the React Native Packager cache.

Motorway answered 8/9, 2020 at 12:3 Comment(1)
This command was sufficient for the same issue I have as the OP. Perhaps @Motorway can update this answer with the reason why --clear flag solves the problem or what that flag does?Advowson

© 2022 - 2024 — McMap. All rights reserved.