WrathChaos / react-native-dynamic-search-bar

Medium Article: https://freakycoder.com/react-native-library-dynamic-search-bar-c03fea9fae36
MIT License
480 stars 52 forks source link

Cannot build app #98

Open 15077693d opened 2 years ago

15077693d commented 2 years ago

This is the error:

./node_modules/@freakycoder/react-native-bounceable/build/dist/RNBounceable.js 30:16
Module parse failed: Unexpected token (30:16)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
|     render() {
|         const { children, style } = this.props;
>         return (<react_native_1.TouchableWithoutFeedback {...this.props} onPress={this.onPress.bind(this, react_native_1.Easing.bounce)}>
|         <react_native_1.Animated.View style={[{ transform: [{ scale: this.state.springValue }] }, style]}>
|           {children}

This is my dependencies:

"dependencies": {
    "@freakycoder/react-native-bounceable": ">= 0.2.2",
    "add": "^2.0.6",
    "expo": "~45.0.0",
    "expo-app-loading": "^2.0.0",
    "expo-font": "^10.1.0",
    "expo-status-bar": "~1.3.0",
    "prettier-plugin-organize-imports": "^3.0.0",
    "react": "17.0.2",
    "react-dom": "17.0.2",
    "react-native": "0.68.2",
    "react-native-animated-spinkit": "^1.4.1",
    "react-native-dynamic-search-bar": "WrathChaos/react-native-dynamic-search-bar#expo",
    "react-native-dynamic-vector-icons": "WrathChaos/react-native-dynamic-vector-icons#expo",
    "react-native-element-dropdown": "^2.1.0",
    "react-native-safe-area-context": "^4.3.1",
    "react-native-user-avatar-component": "^0.0.4",
    "react-native-vector-icons": "^9.2.0",
    "react-native-web": "0.17.7",
    "styled-components": "^5.3.5",
    "yarn": "^1.22.19"
  },
  "devDependencies": {
    "@babel/core": "^7.12.9",
    "@types/jest": "^28.1.6",
    "@types/react": "~17.0.21",
    "@types/react-native": "~0.66.13",
    "@types/react-test-renderer": "^18.0.0",
    "@types/styled-components": "^5.1.25",
    "@types/styled-components-react-native": "^5.1.3",
    "@typescript-eslint/eslint-plugin": "^5.30.7",
    "@typescript-eslint/parser": "^5.30.7",
    "eslint": "^8.20.0",
    "eslint-config-universe": "^11.0.0",
    "jest": "^28.1.3",
    "jest-expo": "^45.0.1",
    "prettier": "^2.7.1",
    "react-test-renderer": "^18.2.0",
    "ts-jest": "^28.0.7",
    "typescript": "~4.3.5"
  }
WrathChaos commented 2 years ago

Hello @15077693d , I will take a look at this today :)

Thank you so much for reporting!

15077693d commented 2 years ago

Which version should I use for avoiding this issue please?

WrathChaos commented 2 years ago

Hello @15077693d again,

I updated the example project. Also, updated the @freakycoder/react-native-bounceable to 1.0.2 and it works without an issue. Also, It is working with 0.2.2.

I could not reproduce the issue. Can you share with me a reproducible project? or even share a code example?

Edit:

One more question, are you using dynamic-search-bar library on an expo project or pure react native one?

Edit 2:

I just checked again on your dependencies and you're using expo. Let me test it on expo as well

WrathChaos commented 2 years ago

Hey @15077693d I created a fresh expo project and simply implement the dynamic search bar with its dependencies. It simply does work without an issue.

You can reach the expo-example

I could not reproduce this issue. Can you try to upgrade the @freakycoder/react-native-bounceable to 1.0.2 maybe it will fixes it.

Also, I updated the Expo Installation part for the README. We do not need react-native-vector-icons as a dependency anymore.

15077693d commented 2 years ago

I'm using typescript will it the cause of error?

WrathChaos commented 2 years ago

Nope, It shouldn't be. Have you tried to upgrade the react-native-bounceable library? @15077693d

15077693d commented 2 years ago

I updated "@freakycoder/react-native-bounceable": "1.0.2", This is my repo below: https://github.com/15077693d/letsgo You could reproduce the issue with

  1. yarn
  2. yarn web
WrathChaos commented 2 years ago

Oww, you're using react-native-web?? Sorry, I have no experience with react-native-web. Only works with mobile react-native. I will take a look at it anyway.