react-native-reanimated
react-native-reanimated copied to clipboard
Error: Unable to resolve module ./reanimated1 from node_modules/react-native-reanimated/src/Animated.js
Description
error: Error: Unable to resolve module ./reanimated1 from /Users/ansarazees/Desktop/nithinProjects/Vlenza/node_modules/react-native-reanimated/src/Animated.js:
None of these files exist:
- node_modules/react-native-reanimated/src/reanimated1(.native|.android.js|.native.js|.js|.android.json|.native.json|.json|.android.ts|.native.ts|.ts|.android.tsx|.native.tsx|.tsx)
- node_modules/react-native-reanimated/src/reanimated1/index(.native|.android.js|.native.js|.js|.android.json|.native.json|.json|.android.ts|.native.ts|.ts|.android.tsx|.native.tsx|.tsx)
1 | import { Image, ScrollView, Text, View } from 'react-native'; 2 | import Easing from './Easing'; 3 | import AnimatedClock from './core/AnimatedClock'; 4 | import AnimatedValue from './core/AnimatedValue'; at ModuleResolver.resolveDependency (/Users/ansarazees/Desktop/nithinProjects/Vlenza/node_modules/metro/src/node-haste/DependencyGraph/ModuleResolution.js:107:15) at DependencyGraph.resolveDependency (/Users/ansarazees/Desktop/nithinProjects/Vlenza/node_modules/metro/src/node-haste/DependencyGraph.js:288:43) at Object.resolve (/Users/ansarazees/Desktop/nithinProjects/Vlenza/node_modules/metro/src/lib/transformHelpers.js:129:24) at resolve (/Users/ansarazees/Desktop/nithinProjects/Vlenza/node_modules/metro/src/DeltaBundler/traverseDependencies.js:396:33) at /Users/ansarazees/Desktop/nithinProjects/Vlenza/node_modules/metro/src/DeltaBundler/traverseDependencies.js:412:26 at Array.reduce (
) at resolveDependencies (/Users/ansarazees/Desktop/nithinProjects/Vlenza/node_modules/metro/src/DeltaBundler/traverseDependencies.js:411:33) at processModule (/Users/ansarazees/Desktop/nithinProjects/Vlenza/node_modules/metro/src/DeltaBundler/traverseDependencies.js:140:31) at async addDependency (/Users/ansarazees/Desktop/nithinProjects/Vlenza/node_modules/metro/src/DeltaBundler/traverseDependencies.js:230:18) at async Promise.all (index 11)
Expected behavior
The app doesn't crash.
Snack or minimal code example
Package versions
Actual behavior & steps to reproduce
npm react-native run-android
- React Native: "react-native": "0.66.3",
- React Native Reanimated:"react-native-reanimated": "^1.13.3",
- NodeJS:
- Xcode:
- Java & Gradle:
Affected platforms
- [ ] Android
- [ ] iOS
- [ ] Web
Issue validator
The issue is valid!
Hey, could you provide a repo to reproduce your issue?
I have same issue anyOne can help?
+1. Same issue. Clear EXPO project, only navigator and drawer installed. Everything done by instructions from https://reactnavigation.org/docs/drawer-based-navigation/.
Houston, where is a problem?=)
import * as React from 'react'; import { Button, View } from 'react-native'; import { createDrawerNavigator } from '@react-navigation/drawer'; import { NavigationContainer } from '@react-navigation/native';
function HomeScreen({ navigation }) { return ( <View style={{ flex: 1, alignItems: 'center', justifyContent: 'center' }}> <Button onPress={() => navigation.navigate('Notifications')} title="Go to notifications" /> </View> ); }
function NotificationsScreen({ navigation }) { return ( <View style={{ flex: 1, alignItems: 'center', justifyContent: 'center' }}> <Button onPress={() => navigation.goBack()} title="Go back home" /> </View> ); }
const Drawer = createDrawerNavigator();
export default function App() { return ( <NavigationContainer> <Drawer.Navigator initialRouteName="Home"> <Drawer.Screen name="Home" component={HomeScreen} /> <Drawer.Screen name="Notifications" component={NotificationsScreen} /> </Drawer.Navigator> </NavigationContainer> ); }
{ "name": "drawer-template", "version": "1.0.0", "main": "node_modules/expo/AppEntry.js", "scripts": { "start": "expo start", "android": "expo start --android", "ios": "expo start --ios", "web": "expo start --web", "eject": "expo eject" }, "dependencies": { "@react-navigation/drawer": "^6.3.1", "@react-navigation/native": "^6.0.8", "expo": "~44.0.0", "expo-status-bar": "~1.2.0", "react": "17.0.1", "react-dom": "17.0.1", "react-native": "0.64.3", "react-native-safe-area-context": "3.3.2", "react-native-screens": "~3.10.1", "react-native-web": "0.17.1" }, "devDependencies": { "@babel/core": "^7.12.9" }, "private": true }
I switched my node version to 14 and npm to 8, the issue is solved.
facing the same issue but with reanimated2 folder, using node 14.18.1 and react-native 0.68.1
@piaskowyk @htuohz Im facing same issue with ./reanimated1 @justin-tay Im using https://github.com/software-mansion/react-native-reanimated#429ba3e , this commit has a fix for an error: calling synchronous methods is not allowed in chrome. After fixing this issue, I came across the issue specified above.
Is it mandatory to update npm version for this work?
@bandhavya Actually, I'm not quite sure. And I do reckon there must be other solutions.
@piaskowyk @j-piasecki @justin-tay reanimated1 folder is no longer available. It is just reanimated2 which is available. How do I fix this ?
@bandhavya Hi, support for Reanimated 1 has been dropped in version 3.0.0 (you can read more about it here). You probably want to use this commit https://github.com/software-mansion/react-native-reanimated/commit/7c88caf4dab48b44f6080033f04bd045263296e4, from Reanimated2
branch instead of main
.
I have same issue anyOne can help?
Just run: npm i react-native-reanimated
Just in case another person gets the same error. I think the problem was due to internet connectivity. The files were not completely downloaded. The solution that worked for me was deleting the react-native-reanimated folder then npm install react-native-reanimated.
The same issue
Support for Reanimated 1 has been dropped in version 3.0.0 (you can read more about it here) If you still want to use Reanimated v1 API you need to stay with Reanimated 2. I recommend to use Reanimated 3 due to numerous stability improvements.