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

240
Views
Actualizar a Babel 7: no se pueden leer los 'enlaces' de propiedad de nulo

Acabo de actualizar a Babel 7 (desde 6) ejecutando estos comandos:

 npm remove babel-cli npm install --save-dev @babel/cli @babel/core @babel/preset-env

Aquí está mi archivo .babelrc :

 { "presets": ["env"] }

Entonces corrí:

 babel js/src --out-dir js/dist

Y da como resultado:

 TypeError: Cannot read property 'bindings' of null at Scope.moveBindingTo (/xyz/node_modules/@babel/traverse/lib/scope/index.js:867:13) at BlockScoping.updateScopeInfo (/xyz/node_modules/babel-plugin-transform-es2015-block-scoping/lib/index.js:364:17) at BlockScoping.run (/xyz/node_modules/babel-plugin-transform-es2015-block-scoping/lib/index.js:330:12) at PluginPass.BlockStatementSwitchStatementProgram (/xyz/node_modules/babel-plugin-transform-es2015-block-scoping/lib/index.js:70:24) at newFn (/xyz/node_modules/@babel/traverse/lib/visitors.js:193:21) at NodePath._call (/xyz/node_modules/@babel/traverse/lib/path/context.js:53:20) at NodePath.call (/xyz/node_modules/@babel/traverse/lib/path/context.js:40:17) at NodePath.visit (/xyz/node_modules/@babel/traverse/lib/path/context.js:88:12) at TraversalContext.visitQueue (/xyz/node_modules/@babel/traverse/lib/context.js:118:16) at TraversalContext.visitSingle (/xyz/node_modules/@babel/traverse/lib/context.js:90:19)

¿Qué hice mal?

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

En su archivo .babelrc , cambie

 { "presets": ["env"] }

para

 { "presets": ["@babel/preset-env"] }

(e instale ese paquete si aún no lo ha hecho).

En su .babelrc todavía está haciendo referencia al paquete babel-preset-env (que es para 6.x), desea hacer referencia a @babel/preset-env en su lugar (que es para 7.x).

https://github.com/babel/babel/issues/6186#issuecomment-366556833

Nota: también debe realizar este cambio en webpack.config.js si también está allí.

Aquí está la sección de configuración del paquete web de muestra donde debe cambiar el ajuste preestablecido:

 use: { loader: 'babel-loader', options: { // Here you should change 'env' to '@babel/preset-env' presets: ['@babel/preset-env'], }, },
over 4 years ago · Santiago Trujillo 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!