title: Upgrade to Babel 7: Cannot read property 'bindings' of null
body: <p>I just upgraded to <a href="https://babeljs.io/docs/en/index.html" rel="noreferrer">Babel 7</a> (from 6) by running these commands:</p>
  
  <pre><code>npm remove babel-cli
  npm install --save-dev @babel/cli @babel/core @babel/preset-env
  </code></pre>
  
  <p>Here is my <code>.babelrc</code> file:</p>
  
  <pre><code>{ "presets": ["env"] }
  </code></pre>
  
  <p>Then I ran:</p>
  
  <pre><code>babel js/src --out-dir js/dist
  </code></pre>
  
  <p>And it results in:</p>
  
  <pre><code>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)
  </code></pre>
  
  <p>What did I do wrong?</p>