Upgrade to Babel 7: Cannot read property ‘bindings’ of null

In your .babelrc file, change

{ "presets": ["env"] } 

to

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

(and install that package if you haven’t already).

In your .babelrc you are still referencing the package babel-preset-env (which is for 6.x), you want to reference @babel/preset-env instead (which is for 7.x).

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

Note: you should also make this change in webpack.config.js if it is there as well.

Here is the sample webpack config section where you should change the preset:

use: {
  loader: 'babel-loader',
  options: {
    // Here you should change 'env' to '@babel/preset-env'
    presets: ['@babel/preset-env'],
  },
},

Leave a Comment

tech