xcarpentier/gifted-chat-web-demo

Gifted Chat Web breaks on updating react-native-gifted-chat

ateev opened this issue · 2 comments

ateev commented

Updating react-native-gifted-chat to latest version 0.16.3 breaks the build.

./node_modules/react-native-typing-animation/src/index.js
SyntaxError: /node_modules/react-native-typing-animation/src/index.js: Support for the experimental syntax 'jsx' isn't currently enabled (37:7):

  35 | 
  36 |     return (
> 37 |       <View style={[styles.container, style]}>
     |       ^
  38 |         <Dot x={dotX - dotRadius - dotMargin} y={this.state.y1} radius={dotRadius} style={dotStyles} dotColor={dotColor} />
  39 |         <Dot x={dotX} y={this.state.y2} radius={dotRadius} style={dotStyles} dotColor={dotColor} />
  40 |         <Dot x={dotX + dotRadius + dotMargin} y={this.state.y3} radius={dotRadius} style={dotStyles} dotColor={dotColor} />

Add @babel/preset-react (https://git.io/JfeDR) to the 'presets' section of your Babel config to enable transformation.
If you want to leave it as-is, add @babel/plugin-syntax-jsx (https://git.io/vb4yA) to the 'plugins' section to enable parsing.

Additional Information

  • NodeJs version: 10.16.3
  • React version: 16.13.1
  • React Native version: 0.63.1
  • react-native-gifted-chat version: 0.16.3
  • Platform(s) (iOS, Android, or both?): both
mkgo commented

+1
To confirm, I am getting the same error with the latest version of react-native-gifted-chat

ateev commented

@mkgo I fixed it by excluding react-native-typing-animation in the override function.