jsdf / react-native-htmlview

A React Native component which renders HTML content as native views
ISC License
2.71k stars 467 forks source link

Module parse failed: Unexpected token (108:8) #226

Open mviranyi opened 6 years ago

mviranyi commented 6 years ago

During compilation I'm getting this error:

[./node_modules/react-native-htmlview/HTMLView.js] 268 bytes {fs0} [built] [failed] [1 error]
[1]     + 327 hidden modules
[1] 
[1] ERROR in ./node_modules/react-native-htmlview/HTMLView.js 108:8
[1] Module parse failed: Unexpected token (108:8)
[1] You may need an appropriate loader to handle this file type.
[1] |     if (element) {
[1] |       return (
[1] >         <RootComponent
[1] |           {...this.props.rootComponentProps}
[1] |           style={style}
[1]  @ ./node_modules/react-native-htmlview/index.js 1:0-34 3:15-23

What can I do?

maxolasersquad commented 5 years ago

I'm getting this same error when webpack tries to compile the application.

maxolasersquad commented 5 years ago

This is almost certainly related to react-native-web-community/react-native-web-linear-gradient#1 but I was not able to use the instructions to resolve it for this project.