<h2 dir="auto">Bug Report</h2>
<p dir="auto">I'm trying to deploy a React SPA within a docker container, served through a python Flask app.</p>
<p dir="auto">I'm starting here by asking people on Babel, because I think it might be something to do with the way I've set up babel, but I guess it could just as easily be an issue with Parcel or something else.</p>
<p dir="auto"><strong>Current Behavior</strong><br>
When using <code class="notranslate">parcel build</code> to bundle an app, I get the following error:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="🚨  Cannot find module '@babel/highlight'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:609:15)
    at Function.Module._load (internal/modules/cjs/loader.js:535:25)
    at Module.require (internal/modules/cjs/loader.js:663:17)
    at require (/node_modules/v8-compile-cache/v8-compile-cache.js:159:20)
    at _highlight (/node_modules/@babel/code-frame/lib/index.js:10:40)
    at codeFrameColumns (/node_modules/@babel/code-frame/lib/index.js:98:21)
    at JSAsset.generateErrorMessage (/node_modules/parcel-bundler/src/assets/JSAsset.js:277:23)
    at Bundler.throwDepError (/node_modules/parcel-bundler/src/Bundler.js:521:19)
error Command failed with exit code 1."><pre class="notranslate"><code class="notranslate">🚨  Cannot find module '@babel/highlight'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:609:15)
    at Function.Module._load (internal/modules/cjs/loader.js:535:25)
    at Module.require (internal/modules/cjs/loader.js:663:17)
    at require (/node_modules/v8-compile-cache/v8-compile-cache.js:159:20)
    at _highlight (/node_modules/@babel/code-frame/lib/index.js:10:40)
    at codeFrameColumns (/node_modules/@babel/code-frame/lib/index.js:98:21)
    at JSAsset.generateErrorMessage (/node_modules/parcel-bundler/src/assets/JSAsset.js:277:23)
    at Bundler.throwDepError (/node_modules/parcel-bundler/src/Bundler.js:521:19)
error Command failed with exit code 1.
</code></pre></div>
<p dir="auto"><strong>Input Code</strong><br>
The relevant parts of my dockerfile are as follows:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="FROM python:3.6.8

RUN apt-get update
RUN apt-get install -y apt-transport-https apt-utils

RUN alias node=nodejs \
    &amp;&amp; curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \
    &amp;&amp; echo &quot;deb https://dl.yarnpkg.com/debian/ stable main&quot; | tee \
    /etc/apt/sources.list.d/yarn.list \
    &amp;&amp; curl -sL https://deb.nodesource.com/setup_11.x | bash - \
    &amp;&amp; apt-get update \
    &amp;&amp; apt-get install -y  nodejs yarn

RUN yarn global add parcel-bundler

COPY requirements.txt /
RUN pip install -r requirements.txt

COPY .babelrc /
COPY package.json /
COPY yarn.lock /


COPY test/ /test/
COPY app/ /app/

COPY client/ /client/

RUN yarn install &amp;&amp; yarn list | grep @babel &amp;&amp; yarn run parcel build client/*.html

EXPOSE 5000:5000

CMD [&quot;python&quot;, &quot;-um&quot;, &quot;app.main&quot;]"><pre lang="docker" class="notranslate"><code class="notranslate">FROM python:3.6.8

RUN apt-get update
RUN apt-get install -y apt-transport-https apt-utils

RUN alias node=nodejs \
    &amp;&amp; curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \
    &amp;&amp; echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee \
    /etc/apt/sources.list.d/yarn.list \
    &amp;&amp; curl -sL https://deb.nodesource.com/setup_11.x | bash - \
    &amp;&amp; apt-get update \
    &amp;&amp; apt-get install -y  nodejs yarn

RUN yarn global add parcel-bundler

COPY requirements.txt /
RUN pip install -r requirements.txt

COPY .babelrc /
COPY package.json /
COPY yarn.lock /


COPY test/ /test/
COPY app/ /app/

COPY client/ /client/

RUN yarn install &amp;&amp; yarn list | grep @babel &amp;&amp; yarn run parcel build client/*.html

EXPOSE 5000:5000

CMD ["python", "-um", "app.main"]
</code></pre></div>
<p dir="auto"><strong>Expected behavior/code</strong><br>
A clear and concise description of what you expected to happen (or code).</p>
<p dir="auto"><strong>Babel Configuration (.babelrc, package.json, cli command)</strong></p>
<div class="highlight highlight-source-json notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="{
  &quot;name&quot;: &quot;app&quot;,
  &quot;version&quot;: &quot;1.0.0&quot;,
  &quot;main&quot;: &quot;client/index.js&quot;,
  &quot;dependencies&quot;: {
    &quot;adal-angular&quot;: &quot;^1.0.17&quot;,
    &quot;axios&quot;: &quot;^0.18.0&quot;,
    &quot;azure-storage&quot;: &quot;^2.10.2&quot;,
    &quot;bloomer&quot;: &quot;^0.6.5&quot;,
    &quot;eslint-config-google&quot;: &quot;^0.11.0&quot;,
    &quot;global&quot;: &quot;^4.3.2&quot;,
    &quot;lodash&quot;: &quot;^4.17.11&quot;,
    &quot;node&quot;: &quot;^11.6.0&quot;,
    &quot;node-sass&quot;: &quot;^4.10.0&quot;,
    &quot;parcel-bundler&quot;: &quot;^1.10.3&quot;,
    &quot;prop-types&quot;: &quot;^15.6.2&quot;,
    &quot;react&quot;: &quot;^16.0.0&quot;,
    &quot;react-dom&quot;: &quot;^16.0.0&quot;,
    &quot;react-table&quot;: &quot;^6.8.6&quot;,
    &quot;reactjs-popup&quot;: &quot;^1.3.2&quot;,
    &quot;request&quot;: &quot;^2.34&quot;,
    &quot;request-promise-native&quot;: &quot;^1.0.5&quot;,
    &quot;uuid&quot;: &quot;^3.3.2&quot;
  },
  &quot;devDependencies&quot;: {
    &quot;@babel/highlight&quot;: &quot;^7.0.0&quot;,
    &quot;babel-code-frame&quot;: &quot;^6.26.0&quot;,
    &quot;babel-core&quot;: &quot;^6.26.3&quot;,
    &quot;babel-eslint&quot;: &quot;^10.0.1&quot;,
    &quot;babel-preset-env&quot;: &quot;^1.7.0&quot;,
    &quot;babel-preset-react&quot;: &quot;^6.24.1&quot;,
    &quot;bulma&quot;: &quot;^0.7.2&quot;,
    &quot;eslint&quot;: &quot;^5.12.0&quot;,
    &quot;eslint-config-prettier&quot;: &quot;^3.3.0&quot;,
    &quot;eslint-plugin-prettier&quot;: &quot;^3.0.1&quot;,
    &quot;eslint-plugin-react&quot;: &quot;^7.12.3&quot;,
    &quot;prettier&quot;: &quot;^1.15.3&quot;,
    &quot;sass&quot;: &quot;^1.15.3&quot;
  },
  &quot;scripts&quot;: {
    &quot;start&quot;: &quot;parcel client/*.html -p 3000&quot;,
    &quot;build&quot;: &quot;parcel build client/*.html&quot;
  }
}
"><pre class="notranslate">{
  <span class="pl-ent">"name"</span>: <span class="pl-s"><span class="pl-pds">"</span>app<span class="pl-pds">"</span></span>,
  <span class="pl-ent">"version"</span>: <span class="pl-s"><span class="pl-pds">"</span>1.0.0<span class="pl-pds">"</span></span>,
  <span class="pl-ent">"main"</span>: <span class="pl-s"><span class="pl-pds">"</span>client/index.js<span class="pl-pds">"</span></span>,
  <span class="pl-ent">"dependencies"</span>: {
    <span class="pl-ent">"adal-angular"</span>: <span class="pl-s"><span class="pl-pds">"</span>^1.0.17<span class="pl-pds">"</span></span>,
    <span class="pl-ent">"axios"</span>: <span class="pl-s"><span class="pl-pds">"</span>^0.18.0<span class="pl-pds">"</span></span>,
    <span class="pl-ent">"azure-storage"</span>: <span class="pl-s"><span class="pl-pds">"</span>^2.10.2<span class="pl-pds">"</span></span>,
    <span class="pl-ent">"bloomer"</span>: <span class="pl-s"><span class="pl-pds">"</span>^0.6.5<span class="pl-pds">"</span></span>,
    <span class="pl-ent">"eslint-config-google"</span>: <span class="pl-s"><span class="pl-pds">"</span>^0.11.0<span class="pl-pds">"</span></span>,
    <span class="pl-ent">"global"</span>: <span class="pl-s"><span class="pl-pds">"</span>^4.3.2<span class="pl-pds">"</span></span>,
    <span class="pl-ent">"lodash"</span>: <span class="pl-s"><span class="pl-pds">"</span>^4.17.11<span class="pl-pds">"</span></span>,
    <span class="pl-ent">"node"</span>: <span class="pl-s"><span class="pl-pds">"</span>^11.6.0<span class="pl-pds">"</span></span>,
    <span class="pl-ent">"node-sass"</span>: <span class="pl-s"><span class="pl-pds">"</span>^4.10.0<span class="pl-pds">"</span></span>,
    <span class="pl-ent">"parcel-bundler"</span>: <span class="pl-s"><span class="pl-pds">"</span>^1.10.3<span class="pl-pds">"</span></span>,
    <span class="pl-ent">"prop-types"</span>: <span class="pl-s"><span class="pl-pds">"</span>^15.6.2<span class="pl-pds">"</span></span>,
    <span class="pl-ent">"react"</span>: <span class="pl-s"><span class="pl-pds">"</span>^16.0.0<span class="pl-pds">"</span></span>,
    <span class="pl-ent">"react-dom"</span>: <span class="pl-s"><span class="pl-pds">"</span>^16.0.0<span class="pl-pds">"</span></span>,
    <span class="pl-ent">"react-table"</span>: <span class="pl-s"><span class="pl-pds">"</span>^6.8.6<span class="pl-pds">"</span></span>,
    <span class="pl-ent">"reactjs-popup"</span>: <span class="pl-s"><span class="pl-pds">"</span>^1.3.2<span class="pl-pds">"</span></span>,
    <span class="pl-ent">"request"</span>: <span class="pl-s"><span class="pl-pds">"</span>^2.34<span class="pl-pds">"</span></span>,
    <span class="pl-ent">"request-promise-native"</span>: <span class="pl-s"><span class="pl-pds">"</span>^1.0.5<span class="pl-pds">"</span></span>,
    <span class="pl-ent">"uuid"</span>: <span class="pl-s"><span class="pl-pds">"</span>^3.3.2<span class="pl-pds">"</span></span>
  },
  <span class="pl-ent">"devDependencies"</span>: {
    <span class="pl-ent">"@babel/highlight"</span>: <span class="pl-s"><span class="pl-pds">"</span>^7.0.0<span class="pl-pds">"</span></span>,
    <span class="pl-ent">"babel-code-frame"</span>: <span class="pl-s"><span class="pl-pds">"</span>^6.26.0<span class="pl-pds">"</span></span>,
    <span class="pl-ent">"babel-core"</span>: <span class="pl-s"><span class="pl-pds">"</span>^6.26.3<span class="pl-pds">"</span></span>,
    <span class="pl-ent">"babel-eslint"</span>: <span class="pl-s"><span class="pl-pds">"</span>^10.0.1<span class="pl-pds">"</span></span>,
    <span class="pl-ent">"babel-preset-env"</span>: <span class="pl-s"><span class="pl-pds">"</span>^1.7.0<span class="pl-pds">"</span></span>,
    <span class="pl-ent">"babel-preset-react"</span>: <span class="pl-s"><span class="pl-pds">"</span>^6.24.1<span class="pl-pds">"</span></span>,
    <span class="pl-ent">"bulma"</span>: <span class="pl-s"><span class="pl-pds">"</span>^0.7.2<span class="pl-pds">"</span></span>,
    <span class="pl-ent">"eslint"</span>: <span class="pl-s"><span class="pl-pds">"</span>^5.12.0<span class="pl-pds">"</span></span>,
    <span class="pl-ent">"eslint-config-prettier"</span>: <span class="pl-s"><span class="pl-pds">"</span>^3.3.0<span class="pl-pds">"</span></span>,
    <span class="pl-ent">"eslint-plugin-prettier"</span>: <span class="pl-s"><span class="pl-pds">"</span>^3.0.1<span class="pl-pds">"</span></span>,
    <span class="pl-ent">"eslint-plugin-react"</span>: <span class="pl-s"><span class="pl-pds">"</span>^7.12.3<span class="pl-pds">"</span></span>,
    <span class="pl-ent">"prettier"</span>: <span class="pl-s"><span class="pl-pds">"</span>^1.15.3<span class="pl-pds">"</span></span>,
    <span class="pl-ent">"sass"</span>: <span class="pl-s"><span class="pl-pds">"</span>^1.15.3<span class="pl-pds">"</span></span>
  },
  <span class="pl-ent">"scripts"</span>: {
    <span class="pl-ent">"start"</span>: <span class="pl-s"><span class="pl-pds">"</span>parcel client/*.html -p 3000<span class="pl-pds">"</span></span>,
    <span class="pl-ent">"build"</span>: <span class="pl-s"><span class="pl-pds">"</span>parcel build client/*.html<span class="pl-pds">"</span></span>
  }
}
</pre></div>
<p dir="auto"><strong>Environment</strong></p>
<ul dir="auto">
<li>Babel version(s):</li>
<li>Node/npm version: Node 11.9 (same issue on node 10.11)/Yarn 1.13</li>
<li>OS: Running in a docker container in Ubuntu</li>
<li>Monorepo: [e.g. yes/no/Lerna]</li>
<li>How you are using Babel: [e.g. <code class="notranslate">cli</code>, <code class="notranslate">register</code>, <code class="notranslate">loader</code>]</li>
</ul>
<blockquote>
<p dir="auto">Issue originally made by Dave Thompson (dave.w.thompson)</p>
</blockquote>
<h3 dir="auto">Bug information</h3>
<ul dir="auto">
<li><strong>Babel version:</strong> 6.13.0</li>
<li><strong>Node version:</strong> 6.2.1</li>
<li><strong>npm version:</strong> 3.9.3</li>
</ul>
<h3 dir="auto">Options</h3>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="npm install --save babel-core babel-loader babel-preset-es2015 babel-preset-es2016 babel-preset-react"><pre class="notranslate"><code class="notranslate">npm install --save babel-core babel-loader babel-preset-es2015 babel-preset-es2016 babel-preset-react
</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="(no code)"><pre class="notranslate"><span class="pl-kos">(</span><span class="pl-s1">no</span> <span class="pl-s1">code</span><span class="pl-kos">)</span></pre></div>
<h3 dir="auto">Description</h3>
<p dir="auto">npm ERR! Windows_NT 6.1.7601<br>
npm ERR! argv "C:\Dev\Apps\nodejs32\node.exe" "C:\Dev\Apps\nodejs32\node_modules\npm\bin\npm-cli.js" "install" "--save" "babel-core" "babel-loader" "babel-preset-es2015" "babel-preset-es2016" "babel-preset-react"<br>
npm ERR! node v6.2.1<br>
npm ERR! npm  v3.9.3</p>
<p dir="auto">npm ERR! No compatible version found: babel-traverse@^6.13.0<br>
npm ERR! Valid install targets:<br>
npm ERR! 6.12.0, 6.11.4, 6.10.4, 6.9.0, 6.8.0, 6.7.6, 6.7.5, 6.7.4, 6.7.3, 6.7.2, 6.7.0, 6.6.5, 6.6.4, 6.6.3, 6.6.2, 6.6.0, 6.5.0, 6.5.0-1, 6.4.5, 6.3.26, 6.3.25, 6.3.24, 6.3.21, 6.3.19, 6.3.17, 6.3.16, 6.3.15, 6.3.14, 6.3.13, 6.3.2, 6.2.4, 6.2.0, 6.1.20, 6.1.18, 6.1.17, 6.1.4, 6.1.2, 6.0.20, 6.0.19, 6.0.18, 6.0.17, 6.0.16, 6.0.14, 6.0.2<br>
npm ERR!<br>
npm ERR!<br>
npm ERR! If you need help, you may report this error at:<br>
npm ERR!     <a href="https://github.com/npm/npm/issues">https://github.com/npm/npm/issues</a></p>
<p dir="auto">npm ERR! Please include the following file with any support request:<br>
npm ERR!     [redacted]\npm-debug.log</p>