<h2 dir="auto">Bug Report</h2>
<p dir="auto"><strong>Current Behavior</strong><br>
After I upgrade @babel/core to v7.5.5, circleci build throw error <code class="notranslate">TypeError: helpers(...).ensure is not a function</code></p>
<p dir="auto">This error only happen in circleci environment. No error in windows or Mac</p>
<p dir="auto"><strong>Environment</strong></p>
<ul dir="auto">
<li>Babel version(s): [v7.5.5]</li>
<li>Node/npm version: [e.g. Node 10/npm 5]</li>
<li>OS: [linux]</li>
<li>How you are using Babel: [<code class="notranslate">loader</code>]</li>
</ul>
<p dir="auto"><strong>Possible Solution</strong><br>
The error happen in below line in v7.5.5<br>
</p><div class="Box Box--condensed my-2">
  <div class="Box-header f6">
    <p class="mb-0 text-bold">
      <a href="https://github.com/babel/babel/blob/fced5cea430cc00e916876b663a8d2a84a5dad1f/packages/babel-core/src/transformation/file/file.js#L207">babel/packages/babel-core/src/transformation/file/file.js</a>
    </p>
    <p class="mb-0 color-fg-muted">
         Line 207
      in
      <a data-pjax="true" class="commit-tease-sha" href="/babel/babel/commit/fced5cea430cc00e916876b663a8d2a84a5dad1f">fced5ce</a>
    </p>
  </div>
  <div itemprop="text" class="Box-body p-0 blob-wrapper blob-wrapper-embedded data">
    <table class="highlight tab-size mb-0 js-file-line-container" data-tab-size="8" data-paste-markdown-skip="">

        <tbody><tr class="border-0">
          <td id="L207" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="207"></td>
          <td id="LC207" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> <span class="pl-s1">helpers</span><span class="pl-kos">.</span><span class="pl-en">ensure</span><span class="pl-kos">(</span><span class="pl-s1">name</span><span class="pl-kos">)</span><span class="pl-kos">;</span> </td>
        </tr>
    </tbody></table>
  </div>
</div>
<p></p>
<p dir="auto"><strong>Additional context/Screenshots</strong><br>
<a target="_blank" rel="noopener noreferrer nofollow" href="https://user-images.githubusercontent.com/5472912/61847532-9908b180-aedd-11e9-8c96-3a242c363300.png"><img src="https://user-images.githubusercontent.com/5472912/61847532-9908b180-aedd-11e9-8c96-3a242c363300.png" alt="image" style="max-width: 100%;"></a><br>
<a href="https://circleci.com/gh/freshesx/mogul/607" rel="nofollow">@babel/core v7.5.5 build log</a><br>
<a href="https://circleci.com/gh/freshesx/mogul/603" rel="nofollow">@babel/core v7.5.4 build log</a></p>
<p dir="auto">It looks like if I have:</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="class Test {
  constructor() {
    someService.get().then(async () =&gt; {
      this.foo = 'tada';
    })
  }
}"><pre class="notranslate"><span class="pl-k">class</span> <span class="pl-v">Test</span> <span class="pl-kos">{</span>
  <span class="pl-en">constructor</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
    <span class="pl-s1">someService</span><span class="pl-kos">.</span><span class="pl-en">get</span><span class="pl-kos">(</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">then</span><span class="pl-kos">(</span><span class="pl-k">async</span> <span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-kos">{</span>
      <span class="pl-smi">this</span><span class="pl-kos">.</span><span class="pl-c1">foo</span> <span class="pl-c1">=</span> <span class="pl-s">'tada'</span><span class="pl-kos">;</span>
    <span class="pl-kos">}</span><span class="pl-kos">)</span>
  <span class="pl-kos">}</span>
<span class="pl-kos">}</span></pre></div>
<p dir="auto"><code class="notranslate">this</code> is <code class="notranslate">undefined</code>. If I remove <code class="notranslate">async</code> I have the right <code class="notranslate">this</code>.</p>