Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

121
Vistas
problem publishing a package and installing it

I created a simple package where it only has a <div> x </div> and published it with npm publish. Then I tried to install it in a project with npm i and it throws me this error: Support for the experimental syntax 'jsx' isn't currently enabled I tried to install @babel/preset-react, I set the babel.config.js like this

module.exports = {
   presets: ["@babel/env", "@babel/react"],
};

But I couldn't figure it out. PS: sorry for my bad english PS2: i created my app with npx create-react-app

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

There isn't really enough info / code in your question to solve your specific problem but my guess would be to check your loaders in webpack.config.js. You should have babel-loader installed and included as a rule in webpack config:

module: {
  rules: [
    {
      test: /\.(js|jsx)$/,
      use: 'babel-loader',
      exclude: /node_modules/
    }
  ]
}

Having said that, I found when I wanted to make my own package that starting with create-react-app didn't give enough control and came with a lot of bloat. I'd recommend starting with createapp.dev, where you can select what elements to include in your build and it will generate the boilerplate code. This example is probably enough to build a minimal react component package.

I recently wrote an article about my experiences making a simple-as-possible package, it might also help.

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda