Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: Unable to resolve module react-native/Libraries/Animated/src/Easing from D:\working_workspace\waterproof_project\6.code\newWaterproofApp\node_modules\teaset\components\ListRow\TouchableOpacity.js: react-native/Libraries/Animated/src/Easing could not be found within the project or in these directories: #456

Open
HY88883 opened this issue Dec 17, 2021 · 4 comments

Comments

@HY88883
Copy link

HY88883 commented Dec 17, 2021

Hi! 👋

Firstly, thanks for your work on this project! 🙂

Today I used patch-package to patch [email protected] for the project I'm working on.

Here is the diff that solved my problem:

diff --git a/node_modules/teaset/components/ListRow/TouchableOpacity.js b/node_modules/teaset/components/ListRow/TouchableOpacity.js
index 8fc32cf..a4f1fb3 100644
--- a/node_modules/teaset/components/ListRow/TouchableOpacity.js
+++ b/node_modules/teaset/components/ListRow/TouchableOpacity.js
@@ -4,7 +4,7 @@ import React, {Component} from 'react';
 import PropTypes from 'prop-types';
 
 import {Platform, TouchableWithoutFeedback, Animated, ViewPropTypes} from 'react-native';
-import Easing from 'react-native/Libraries/Animated/src/Easing';
+import Easing from 'react-native/Libraries/Animated/Easing';
 import flattenStyle from 'react-native/Libraries/StyleSheet/flattenStyle';
 
 if (Platform.constants.reactNativeVersion.major === 0 && Platform.constants.reactNativeVersion.minor < 62) {

This issue body was partially generated by patch-package.

@zsswlr
Copy link

zsswlr commented Dec 17, 2021 via email

@DerekCute
Copy link

I faced same issue,
Hope to get right answer as soon as possible.
Thanks.

@champagneht
Copy link

The same problem

@cwj10
Copy link

cwj10 commented Jan 14, 2022

Add some configuration to babel.config.js

module.exports = {
  presets: ['module:metro-react-native-babel-preset'],
  plugins: [
    [
      require.resolve('babel-plugin-module-resolver'),
      {
        extensions: ['.js', '.png'],
        alias: {
          //
          'react-native/Libraries/Animated/src/Easing': 'react-native/Libraries/Animated/Easing',
        },
      },
    ]
  ],
};

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants