galio icon indicating copy to clipboard operation
galio copied to clipboard

Error: Unexpected token on Toast static propTypes

Open EAfang opened this issue 4 years ago • 9 comments

Getting error on Toast static propTypes

` /node_modules/galio-framework/src/Toast.js 11:19 Module parse failed: Unexpected token (11:19) 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 | | class Toast extends Component {

static propTypes = { | children: PropTypes.node.isRequired, | isShow: PropTypes.bool.isRequired, `

EAfang avatar Mar 05 '20 07:03 EAfang

Same Problem here. Can anyone help?

tilldomke avatar Mar 20 '20 14:03 tilldomke

Kindly provide a reproducible example so I could look into it...

AndyOsei avatar Mar 20 '20 14:03 AndyOsei

The Error occurs when I try to run the app in any way via expo start after npm install galio-framework. It happens with a new, clean app and with my app already in development

tilldomke avatar Mar 20 '20 15:03 tilldomke

I don't think this is an issue with Galio, it because of your babel loader config and/or webpack if you are using it. Try clearing your bundler cache and make sure your babel.config.js or web pack.config.js if any is using the appropriate config rules.

AndyOsei avatar Mar 21 '20 09:03 AndyOsei

I am facing the same issue when trying to build for web using expo

syky27 avatar Apr 10 '20 00:04 syky27

Same, fixed this by updating app.json and including the following in the expo section: "web": { "build": { "babel": { "include": ["galio-framework"] } } }

RichardTheHouse avatar Apr 12 '20 08:04 RichardTheHouse

@RichardTheHouse Thanks, I figured that out, unfortunately I am getting error with almost all of my dependencies...

syky27 avatar Apr 13 '20 14:04 syky27

same problem after installing galio-framework on existing app

BoGnY avatar Apr 07 '21 09:04 BoGnY

Any Updates on this issue?

ismailfarooq avatar Jan 23 '22 16:01 ismailfarooq