akveo / react-native-ui-kitten

:boom: React Native UI Library based on Eva Design System :new_moon_with_face::sparkles:Dark Mode
https://akveo.github.io/react-native-ui-kitten/
MIT License
10.35k stars 957 forks source link

Expo SDK 49 issue (This experimental syntax requires enabling one of the following parser plugin) #1766

Open karimcambridge opened 1 year ago

karimcambridge commented 1 year ago

🐛 Bug Report

On startup, we get this error

SyntaxError in node_modules/@ui-kitten/components/theme/style/styled.js: This experimental syntax requires enabling one of the following parser plugin(s): "jsx", "flow", "typescript". (108:20)

__37-[ABI49_0_0RCTCxxBridge handleError:]_block_invoke
_dispatch_call_block_and_release
_dispatch_client_callout
_dispatch_main_queue_drain
_dispatch_main_queue_callback_4CF
__CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__
__CFRunLoopRun
CFRunLoopRunSpecific
GSEventRunModal
-[UIApplication _run]
UIApplicationMain
main
start_sim
0x0
0x0

To Reproduce

Steps to reproduce the behavior:

Upgrade your app to SDK 49.

Expected behavior

Link to runnable example or repository (highly encouraged)

UI Kitten and Eva version

Package Version
@eva-design/eva 2.2.0
@ui-kitten/components 5.3.1

Environment information

System:
    OS: macOS 13.4.1
    CPU: (10) arm64 Apple M2 Pro
  Binaries:
    Node: 18.16.0 - ~/.nvm/versions/node/v18.16.0/bin/node
    Yarn: 1.22.19 - ~/.nvm/versions/node/v18.16.0/bin/yarn
    npm: 9.8.0 - ~/.nvm/versions/node/v18.16.0/bin/npm
    pnpm: 8.6.7 - ~/.nvm/versions/node/v18.16.0/bin/pnpm
    Watchman: 2023.06.08.00 - /opt/homebrew/bin/watchman
  SDKs:
    iOS SDK:
      Platforms: DriverKit 22.4, iOS 16.4, macOS 13.3, tvOS 16.4, watchOS 9.4
    Android SDK:
      API Levels: 33
      Build Tools: 33.0.2
      System Images: android-33 | Google APIs ARM 64 v8a
  IDEs:
    Android Studio: 2022.2 AI-222.4459.24.2221.10121639
    Xcode: 14.3.1/14E300c - /usr/bin/xcodebuild
  npmPackages:
    react: 18.2.0 => 18.2.0 
    react-native: 0.72.3 => 0.72.3
NazarDevsMedia commented 1 year ago

same issue in SDK 48. i have previously tried to fix apollo error TypeError: Cannot read property 'data' of undefined by adding exotic mode in metro.config.js:

const config = getDefaultConfig(__dirname, {
    // Initialize in exotic mode.
    // If you want to preserve `react-native` resolver main field, and omit cjs support, then leave this undefined
    // and skip setting the `EXPO_USE_EXOTIC` environment variable.
    mode: 'exotic',
});

https://github.com/apollographql/react-apollo/issues/3922 https://github.com/expo/expo/issues/15860 but then I got experimental syntax error. if you are running into the same scenario my way to go was to downgrade apollo/client version and remove exotic mode from metro config.