<blockquote>
<p dir="auto">Issue originally made by <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/FranzPoize/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/FranzPoize">@FranzPoize</a></p>
</blockquote>
<h3 dir="auto">Bug information</h3>
<ul dir="auto">
<li><strong>Babel version:</strong> 6.4.0</li>
<li><strong>Node version:</strong> 4.2.3</li>
<li><strong>npm version:</strong> 2.14.7</li>
</ul>
<h3 dir="auto">Options</h3>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="{
    &quot;presets&quot;: [
        &quot;es2015&quot;,
        &quot;react&quot;
    ],
    &quot;ignore&quot;: &quot;/node_modules/&quot;,
    &quot;plugins&quot;: [
        &quot;transform-class-properties&quot;,
        &quot;syntax-async-functions&quot;,
        [&quot;transform-async-to-module-method&quot;, {
            &quot;module&quot;: &quot;bluebird&quot;,
            &quot;method&quot;: &quot;coroutine&quot;
        }]
    ]
}"><pre class="notranslate"><code class="notranslate">{
    "presets": [
        "es2015",
        "react"
    ],
    "ignore": "/node_modules/",
    "plugins": [
        "transform-class-properties",
        "syntax-async-functions",
        ["transform-async-to-module-method", {
            "module": "bluebird",
            "method": "coroutine"
        }]
    ]
}
</code></pre></div>
<h3 dir="auto">Input code</h3>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="class stuff {
    async yo() {
        const ouais = something();
    }
}"><pre class="notranslate"><span class="pl-k">class</span> <span class="pl-s1">stuff</span> <span class="pl-kos">{</span>
    <span class="pl-k">async</span> <span class="pl-en">yo</span><span class="pl-kos">(</span><span class="pl-kos">)</span> <span class="pl-kos">{</span>
        <span class="pl-k">const</span> <span class="pl-s1">ouais</span> <span class="pl-c1">=</span> <span class="pl-en">something</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>
<h3 dir="auto">Description</h3>
<p dir="auto">When using <code class="notranslate">transform-async-to-module-method</code> this is the error we get</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="SyntaxError: test-babel.js: &quot;ouais&quot; is read-only (This is an error on an internal node. Probably an internal error. Location has been estimated.)"><pre class="notranslate"><code class="notranslate">SyntaxError: test-babel.js: "ouais" is read-only (This is an error on an internal node. Probably an internal error. Location has been estimated.)
</code></pre></div>
<p dir="auto">When using <code class="notranslate">transform-regenerator</code> it works as it should.</p>
<h2 dir="auto">Bug Report</h2>
<p dir="auto"><strong>Current Behavior</strong></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&gt; babel . --out-dir dist

SyntaxError: Expected atom at position 2
    \p{Script_Ex
      ^
    at bail (/home/shm/dpp-query-ws/node_modules/regjsparser/parser.js:1093:13)
    at parseTerm (/home/shm/dpp-query-ws/node_modules/regjsparser/parser.js:486:9)
    at parseAlternative (/home/shm/dpp-query-ws/node_modules/regjsparser/parser.js:457:21)
    at parseDisjunction (/home/shm/dpp-query-ws/node_modules/regjsparser/parser.js:437:16)
    at parse (/home/shm/dpp-query-ws/node_modules/regjsparser/parser.js:1108:18)
    at rewritePattern (/home/shm/dpp-query-ws/node_modules/regexpu-core/rewrite-pattern.js:324:15)
    at PluginPass.RegExpLiteral (/home/shm/dpp-query-ws/node_modules/@babel/plugin-transform-unicode-regex/lib/index.js:50:51)
    at newFn (/home/shm/dpp-query-ws/node_modules/@babel/traverse/lib/visitors.js:193:21)
    at NodePath._call (/home/shm/dpp-query-ws/node_modules/@babel/traverse/lib/path/context.js:53:20)
    at NodePath.call (/home/shm/dpp-query-ws/node_modules/@babel/traverse/lib/path/context.js:40:17)"><pre class="notranslate"><code class="notranslate">&gt; babel . --out-dir dist

SyntaxError: Expected atom at position 2
    \p{Script_Ex
      ^
    at bail (/home/shm/dpp-query-ws/node_modules/regjsparser/parser.js:1093:13)
    at parseTerm (/home/shm/dpp-query-ws/node_modules/regjsparser/parser.js:486:9)
    at parseAlternative (/home/shm/dpp-query-ws/node_modules/regjsparser/parser.js:457:21)
    at parseDisjunction (/home/shm/dpp-query-ws/node_modules/regjsparser/parser.js:437:16)
    at parse (/home/shm/dpp-query-ws/node_modules/regjsparser/parser.js:1108:18)
    at rewritePattern (/home/shm/dpp-query-ws/node_modules/regexpu-core/rewrite-pattern.js:324:15)
    at PluginPass.RegExpLiteral (/home/shm/dpp-query-ws/node_modules/@babel/plugin-transform-unicode-regex/lib/index.js:50:51)
    at newFn (/home/shm/dpp-query-ws/node_modules/@babel/traverse/lib/visitors.js:193:21)
    at NodePath._call (/home/shm/dpp-query-ws/node_modules/@babel/traverse/lib/path/context.js:53:20)
    at NodePath.call (/home/shm/dpp-query-ws/node_modules/@babel/traverse/lib/path/context.js:40:17)
</code></pre></div>
<p dir="auto"><strong>Input Code</strong></p>
<ul dir="auto">
<li>REPL or Repo link if applicable:</li>
</ul>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="var your =&gt; (code) =&gt; here;"><pre class="notranslate"><span class="pl-k">var</span> <span class="pl-s1">your</span> <span class="pl-c1">=&gt;</span> <span class="pl-kos">(</span><span class="pl-s1">code</span><span class="pl-kos">)</span> <span class="pl-c1">=&gt;</span> <span class="pl-s1">here</span><span class="pl-kos">;</span></pre></div>
<p dir="auto"><strong>Expected behavior/code</strong><br>
Successful transpiled code</p>
<p dir="auto"><strong>Babel Configuration (.babelrc, package.json, cli command)</strong><br>
package.json</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="&quot;devDependencies&quot;: {
    &quot;@babel/cli&quot;: &quot;^7.1.2&quot;,
    &quot;@babel/core&quot;: &quot;^7.1.2&quot;,
    &quot;@babel/node&quot;: &quot;^7.0.0&quot;,
    &quot;@babel/plugin-proposal-object-rest-spread&quot;: &quot;^7.0.0&quot;,
    &quot;@babel/preset-env&quot;: &quot;^7.1.0&quot;,
    &quot;@babel/preset-flow&quot;: &quot;^7.0.0&quot;,
    &quot;nodemon&quot;: &quot;^1.18.4&quot;
  }"><pre class="notranslate"><span class="pl-s">"devDependencies"</span>: <span class="pl-kos">{</span>
    <span class="pl-s">"@babel/cli"</span>: <span class="pl-s">"^7.1.2"</span><span class="pl-kos">,</span>
    <span class="pl-s">"@babel/core"</span>: <span class="pl-s">"^7.1.2"</span><span class="pl-kos">,</span>
    <span class="pl-s">"@babel/node"</span>: <span class="pl-s">"^7.0.0"</span><span class="pl-kos">,</span>
    <span class="pl-s">"@babel/plugin-proposal-object-rest-spread"</span>: <span class="pl-s">"^7.0.0"</span><span class="pl-kos">,</span>
    <span class="pl-s">"@babel/preset-env"</span>: <span class="pl-s">"^7.1.0"</span><span class="pl-kos">,</span>
    <span class="pl-s">"@babel/preset-flow"</span>: <span class="pl-s">"^7.0.0"</span><span class="pl-kos">,</span>
    <span class="pl-s">"nodemon"</span>: <span class="pl-s">"^1.18.4"</span>
  <span class="pl-kos">}</span></pre></div>
<p dir="auto">babel.config.js</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="module.exports = {
  &quot;presets&quot;: [&quot;@babel/preset-env&quot;,&quot;@babel/preset-flow&quot;],
  &quot;plugins&quot;: [
    &quot;@babel/plugin-proposal-object-rest-spread&quot;
  ]
}"><pre class="notranslate"><span class="pl-smi">module</span><span class="pl-kos">.</span><span class="pl-c1">exports</span> <span class="pl-c1">=</span> <span class="pl-kos">{</span>
  <span class="pl-s">"presets"</span>: <span class="pl-kos">[</span><span class="pl-s">"@babel/preset-env"</span><span class="pl-kos">,</span><span class="pl-s">"@babel/preset-flow"</span><span class="pl-kos">]</span><span class="pl-kos">,</span>
  <span class="pl-s">"plugins"</span>: <span class="pl-kos">[</span>
    <span class="pl-s">"@babel/plugin-proposal-object-rest-spread"</span>
  <span class="pl-kos">]</span>
<span class="pl-kos">}</span></pre></div>
<p dir="auto"><strong>Environment</strong></p>
<ul dir="auto">
<li>Babel version(s): [e.g. v6.0.0, v7.0.0-beta.34]</li>
<li>Node/npm version: Node 8.12.0/npm 6.4.1</li>
<li>OS: Ubuntu 16.04.4 LTS</li>
<li>Monorepo</li>
<li>How you are using Babel: [e.g. <code class="notranslate">cli</code>, <code class="notranslate">register</code>, <code class="notranslate">loader</code>]<br>
cli
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&quot;build&quot;: &quot;babel . --out-dir dist&quot;"><pre class="notranslate"><code class="notranslate">"build": "babel . --out-dir dist"
</code></pre></div>
</li>
</ul>