software-mansion / react-native-reanimated

React Native's Animated library reimplemented
https://docs.swmansion.com/react-native-reanimated/
MIT License
8.97k stars 1.3k forks source link

Error: Unable to resolve module ./reanimated1 from node_modules/react-native-reanimated/src/Animated.js #2687

Closed nithiniLeaf closed 1 year ago

nithiniLeaf commented 2 years ago

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:

Expected behavior

The app doesn't crash.

Snack or minimal code example

Package versions

Actual behavior & steps to reproduce

npm react-native run-android

Affected platforms

github-actions[bot] commented 2 years ago

Issue validator

The issue is valid!

piaskowyk commented 2 years ago

Hey, could you provide a repo to reproduce your issue?

AahilShahzad commented 2 years ago

I have same issue anyOne can help?

Jevgeni-i-am commented 2 years ago

+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?=)

Jevgeni-i-am commented 2 years ago

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" /> ); }

function NotificationsScreen({ navigation }) { return ( <View style={{ flex: 1, alignItems: 'center', justifyContent: 'center' }}> <Button onPress={() => navigation.goBack()} title="Go back home" /> ); }

const Drawer = createDrawerNavigator();

export default function App() { return (

); }

{ "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 }

htuohz commented 2 years ago

I switched my node version to 14 and npm to 8, the issue is solved.

loupmasneri commented 2 years ago

facing the same issue but with reanimated2 folder, using node 14.18.1 and react-native 0.68.1

bandhavya commented 2 years ago

@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?

htuohz commented 2 years ago

@bandhavya Actually, I'm not quite sure. And I do reckon there must be other solutions.

bandhavya commented 2 years ago

@piaskowyk @j-piasecki @justin-tay reanimated1 folder is no longer available. It is just reanimated2 which is available. How do I fix this ?

j-piasecki commented 2 years ago

@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.

jackie20 commented 2 years ago

I have same issue anyOne can help?

Just run: npm i react-native-reanimated

peterven347 commented 1 year ago

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.

alexandr-feschenko commented 1 year ago

The same issue

piaskowyk commented 1 year ago

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.

ARSSHEIKH commented 4 months ago

This plugin resolve my issue in babel.config.js plugins: ['react-native-reanimated/plugin']