teaset
teaset copied to clipboard
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:
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.
这是来自QQ邮箱的假期自动回复邮件。 您好,我最近正在休假中,无法亲自回复您的邮件。我将在假期结束后,尽快给您回复。
I faced same issue, Hope to get right answer as soon as possible. Thanks.
The same problem
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',
},
},
]
],
};