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

fix React native web export path error #2617

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

umutcheckatrade
Copy link

@umutcheckatrade umutcheckatrade commented Jan 16, 2025

Summary

Explain the motivation for making this change: here are some points to help you:

  • Fixed an import issue causing errors in the React Native Web environment.

Fixes these issues:


WARNING in ./node_modules/react-native-svg/lib/module/web/utils/prepare.js:57:8
export 'hasTouchableProperty' (imported as 'hasTouchableProperty') was not found in '../../../../../..' (module has no exports)
  55 |     ref?: unknown;
  56 |   } = {
> 57 |     ...(hasTouchableProperty(props)
     |        ^
  58 |       ? {
  59 |           onStartShouldSetResponder:
  60 |             self.touchableHandleStartShouldSetResponder,

WARNING in ./node_modules/react-native-svg/lib/module/web/utils/prepare.js:79:26
export 'parseTransformProp' (imported as 'parseTransformProp') was not found in '../../../../../..' (module has no exports)
  77 |
  78 |   // we do it like this because setting transform as undefined causes error in web
> 79 |   const parsedTransform = parseTransformProp(transform, props);
     |                          ^
  80 |   if (parsedTransform) {
  81 |     clean.transform = parsedTransform;
  82 |   }

WARNING in ./node_modules/react-native-svg/lib/module/web/utils/prepare.js:83:34
export 'parseTransformProp' (imported as 'parseTransformProp') was not found in '../../../../../..' (module has no exports)
  81 |     clean.transform = parsedTransform;
  82 |   }
> 83 |   const parsedGradientTransform = parseTransformProp(gradientTransform);
     |                                  ^
  84 |   if (parsedGradientTransform) {
  85 |     clean.gradientTransform = parsedGradientTransform;
  86 |   }

WARNING in ./node_modules/react-native-svg/lib/module/web/utils/prepare.js:87:33
export 'parseTransformProp' (imported as 'parseTransformProp') was not found in '../../../../../..' (module has no exports)
  85 |     clean.gradientTransform = parsedGradientTransform;
  86 |   }
> 87 |   const parsedPatternTransform = parseTransformProp(patternTransform);
     |                                 ^
  88 |   if (parsedPatternTransform) {
  89 |     clean.patternTransform = parsedPatternTransform;
  90 |   }

Test Plan

Demonstrate the code is solid. Example: The exact commands you ran and their output, screenshots / videos if the pull request changes UI.

What's required for testing (prerequisites)?

What are the steps to reproduce (after prerequisites)?

Compatibility

OS Implemented
iOS
MacOS
Android
Web

Checklist

  • I have tested this on a device and a simulator
  • I added documentation in README.md
  • I updated the typed files (typescript)
  • I added a test for the API in the __tests__ folder

@migueldaipre
Copy link

Same goal as #2430

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

Successfully merging this pull request may close these issues.

2 participants