galio-starter-kit
galio-starter-kit copied to clipboard
Error : Support for the experimental syntax 'jsx' isn't currently enabled (8:7):
Getting following error .. installed plugin as per the instructions provided in the link , but the error is not going
################################################################# Failed to compile. /galio-starter-kit/App.js SyntaxError:/galio-starter-kit/App.js: Support for the experimental syntax 'jsx' isn't currently enabled (8:7):
6 | render() { 7 | return (
8 | <View style={{ flex: 1 }}> | ^ 9 | <StatusBar hidden={false} /> 10 | <GalioApp /> 11 | </View>
Add @babel/plugin-transform-react-jsx (https://git.io/vb4yd) to the 'plugins' section of your Babel config to enable transformation.
An issue for me as well. I was able to get past this issue by adding babel.config.js in my root directory with the following setup:
module.exports = {
presets:[
"babel-preset-expo",
"@babel/preset-env",
"@babel/preset-react"
],
plugins:[
"@babel/plugin-transform-react-jsx",
["@babel/plugin-proposal-private-methods", { "loose": true }],
["@babel/plugin-proposal-class-properties", { "loose": true }]
]
}
However, it led to an error stating I did not have the correct loader as seen in this issue. I then followed the top voted solution on that page, only to lead to a third error as follows: "Can't resolve 'react-dom/unstable-native-dependencies'"
I tried running npm install [email protected] to see if it was due to the newest version of react-dom and the error went away. Yet, now the page just loads a blank screen due to a frontend error of: TypeError: Object(...) is not a function js index.js:15
At this point, I'm tossing in the hat. Hopefully they're web version gets up and running again. Hopefully someone finds this helpful.