
Oscar Miranda
PreguntaAl compilar me manda este error:
ERROR in ./src/index.js
Module build failed (from ./node_modules/babel-loader/lib/index.js):
SyntaxError: /mnt/d/Effectio Energy Services/NuevoEffectio/effectioecc1/src/index.js: Support for the experimental syntax ‘jsx’ isn’t currently enabled (5:17):
3 | import HelloWorld from ‘./components/HelloWorld.jsx’;
4 |
5 | ReactDOM.render(<HelloWorld/>, document.getElementById(‘app’));
| ^
6 |
7 |
8 |
Add @babel/preset-react (https://git.io/JfeDR) to the ‘presets’ section of your Babel config to enable transformation.
Alguna idea de como corregirlo?

Nilson Diaz
Hey ! Segun veo en tu error , al parecer no tienes el preset de babel que te permite trabajar con react , asegurate que tu archivo .babelrc luzca asi :
{ "plugins": [ "@babel/plugin-transform-runtime"//Asincronismo ], "presets": [ "@babel/preset-env", //Javascript Moderno "@babel/preset-react" //Para trabajar con react ] }
Si no lo tienes lo puedes instalar asi
npm install --save-dev @babel/preset-react
Y ya podras agregarlo a tu archivo de babel
Me cuentas si te funciona !