Skip to content

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

Description

@lymine1996

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions