Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
shekharchauhan opened this issue Feb 24, 2021 · 1 comment

Comments

@shekharchauhan
Copy link

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 |
10 |
11 |

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

@lcundiff
Copy link

lcundiff commented Feb 6, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants