galio-org / galio-starter-kit

Galio's starter kit is an app you can use to see what you can create with our library
https://galio.io
MIT License
182 stars 71 forks source link

Error : Support for the experimental syntax 'jsx' isn't currently enabled (8:7): #26

Open shekharchauhan opened 3 years ago

shekharchauhan commented 3 years ago

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 |

Add @babel/plugin-transform-react-jsx (https://git.io/vb4yd) to the 'plugins' section of your Babel config to enable transformation.

lcundiff commented 2 years ago

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 react-dom@16.0.1 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.