Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

119
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!