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

SyntaxError: Support for the experimental syntax 'jsx' isn't currently enabled (154:9) #10

Open
lymine1996 opened this issue Mar 8, 2022 · 1 comment

Comments

@lymine1996
Copy link

lymine1996 commented Mar 8, 2022

Have anyone encountered the same problem while importing this package?

`./node_modules/react-native-switch-selector/index.js
 SyntaxError: C:\Users\HP\Desktop\MSU_Work\Tool2_CPT_JS\Refactored_CPT\frontend\node_modules\react-native-switch-selector\index.js: Support for the experimental syntax 'jsx' isn't currently enabled (154:9):

   152 |
   153 |       return (
       |         ^
   155 |           key={index}
   156 |           disabled={disabled}
   157 |           style={[

 Add @babel/preset-react (https://git.io/JfeDR) to the 'presets' section of your Babel config to enable transformation.
 If you want to leave it as-is, add @babel/plugin-syntax-jsx (https://git.io/vb4yA) to the 'plugins' section to enable parsing.`

I had these Babel plugins installed in my local node modules but it didn't work, so is it a problem coming along with the package?

@jkdrangel
Copy link
Owner

@lymine1996 i don't know this error, but i put the recommended preset in babel config and create a new version. You can test this in V2.2.0

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