availity-react icon indicating copy to clipboard operation
availity-react copied to clipboard

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

Open sourabhDhariwal1234 opened this issue 9 months ago • 0 comments

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

sourabhDhariwal1234 avatar Oct 27 '23 15:10 sourabhDhariwal1234