Skip to content

@availity/reactstrap-validation-select/src/AvResourceSelect.js Not working in React Project With 17 React Version #1346

@sourabhDhariwal1234

Description

@sourabhDhariwal1234

Getting this issue when Run React application locally

./node_modules/@availity/reactstrap-validation-select/src/AvResourceSelect.js
SyntaxError: F:\work\inventory-mgmt\node_modules@availity\reactstrap-validation-select\src\AvResourceSelect.js: Support for the experimental syntax 'jsx' isn't currently enabled (206:7):

204 |
205 | return (

206 | <Tag
Failed to compile.

./node_modules/@availity/reactstrap-validation-select/src/AvResourceSelect.js
SyntaxError: F:\work\inventory-mgmt\node_modules@availity\reactstrap-validation-select\src\AvResourceSelect.js: Support for the experimental syntax 'jsx' isn't currently enabled (206:7):

204 |
205 | return (

206 | <Tag
| ^
207 | selectRef={this.selectRef}
208 | loadOptions={this.loadOptions}
209 | defaultOptions={waitUntilFocused ? [] : true}

Add @babel/preset-react (https://github.com/babel/babel/tree/main/packages/babel-preset-react) 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://github.com/babel/babel/tree/main/packages/babel-plugin-syntax-jsx) to the 'plugins' section to enable parsing.

I have added babel.config.json file but still getting the same Error

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions