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

436
Views
webpack + react building obtiene un error de babel, la compilación del módulo falló (de ./node_modules/babel-loader/lib/index.js):
ERROR in ./src/index.js Module build failed (from ./node_modules/babel-loader/lib/index.js): TypeError: Cannot read property 'next' of undefined at evaluateSync (/Users/zhanghanfeng/Desktop/testrrw/node_modules/gensync/index.js:251:28) at /Users/zhanghanfeng/Desktop/testrrw/node_modules/gensync/index.js:31:34 at Array.map (<anonymous>) at Function.sync (/Users/zhanghanfeng/Desktop/testrrw/node_modules/gensync/index.js:31:22) at Function.all (/Users/zhanghanfeng/Desktop/testrrw/node_modules/gensync/index.js:210:24) at Generator.next (<anonymous>) at createDescriptors (/Users/zhanghanfeng/Desktop/testrrw/node_modules/@babel/core/lib/config/config-descriptors.js:142:41) at createDescriptors.next (<anonymous>) at createPresetDescriptors (/Users/zhanghanfeng/Desktop/testrrw/node_modules/@babel/core/lib/config/config-descriptors.js:134:17) at createPresetDescriptors.next (<anonymous>)

aquí está mi conjunto

webpack.config.js

 module.exports = { entry:'./src/index.js', mode: 'production', output:{ filename:'[name].js', path:__dirname+'/dist' }, module:{ rules:[ { test: /\.m?js$/, exclude: /node_modules/, use:{ loader: 'babel-loader' } }, // { test: /\.ts$/,exclude: /node_modules/, use: 'ts-loader' }, { test: /\.css$/i, exclude: /node_modules/, use: ["style-loader", "css-loader", "postcss-loader"], }, ] } }

babel.config.js

 module.exports = function (api) { var env = api.cache(() => process.env.NODE_ENV); return { presets: [require("@babel/preset-env"), , require("@babel/preset-react")], plugins: [ [ require('@babel/plugin-transform-runtime'), { corejs: {version: 3, proposals: true}, helpers: true, useESModules: true, regenerator: true, absoluteRuntime: "./node_modules" } ] ], }; };

aquí está el enlace de github: https://github.com/mxm-web-develop/issues Estoy tratando de descubrir la relación básica de reaccionar, babel, resumen o paquete web. el problema de traducción de babel también ocurre en la compilación acumulativa, ¿alguien explica el problema y me ayuda a solucionar el error?

about 4 years ago · Juan Pablo Isaza
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!