<h2 dir="auto">Bug Report</h2>
<p dir="auto"><strong>Current Behavior</strong><br>
I am using</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="require(&quot;@babel/register&quot;)({
  babelrc: false, // Tell babel-register to ignore the .babelrc file
  presets: [&quot;babel-preset-env&quot;, &quot;babel-preset-react&quot;],
  plugins: [
    &quot;babel-plugin-transform-class-properties&quot;,
    &quot;babel-plugin-transform-object-rest-spread&quot;,
    [
      &quot;babel-plugin-transform-runtime&quot;,
      {
        helpers: false,
        polyfill: false,
        regenerator: true
      }
    ]
  ]
});"><pre class="notranslate"><code class="notranslate">require("@babel/register")({
  babelrc: false, // Tell babel-register to ignore the .babelrc file
  presets: ["babel-preset-env", "babel-preset-react"],
  plugins: [
    "babel-plugin-transform-class-properties",
    "babel-plugin-transform-object-rest-spread",
    [
      "babel-plugin-transform-runtime",
      {
        helpers: false,
        polyfill: false,
        regenerator: true
      }
    ]
  ]
});
</code></pre></div>
<p dir="auto">and all I get is an error when requiring the next file which says:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ReferenceError: Unknown option: .caller. Check out http://babeljs.io/docs/usage/options/ for more information about options.
    at buildUnknownError (/Users/andy/Development/oa-content/app/node_modules/@babel/core/lib/config/validation/options.js:98:11)
    at /Users/andy/Development/oa-content/app/node_modules/@babel/core/lib/config/validation/options.js:84:57
    at Array.forEach (&lt;anonymous&gt;)
    at validate (/Users/andy/Development/oa-content/app/node_modules/@babel/core/lib/config/validation/options.js:62:21)
    at loadPrivatePartialConfig (/Users/andy/Development/oa-content/app/node_modules/@babel/core/lib/config/partial.js:28:48)
    at loadFullConfig (/Users/andy/Development/oa-content/app/node_modules/@babel/core/lib/config/full.js:33:37)
    at loadOptions (/Users/andy/Development/oa-content/app/node_modules/@babel/core/lib/config/index.js:18:34)
    at OptionManager.init (/Users/andy/Development/oa-content/app/node_modules/@babel/core/lib/config/index.js:28:12)
    at compile (/Users/andy/Development/oa-content/app/node_modules/@babel/register/lib/node.js:61:42)
    at compileHook (/Users/andy/Development/oa-content/app/node_modules/@babel/register/lib/node.js:102:12)"><pre class="notranslate"><code class="notranslate">ReferenceError: Unknown option: .caller. Check out http://babeljs.io/docs/usage/options/ for more information about options.
    at buildUnknownError (/Users/andy/Development/oa-content/app/node_modules/@babel/core/lib/config/validation/options.js:98:11)
    at /Users/andy/Development/oa-content/app/node_modules/@babel/core/lib/config/validation/options.js:84:57
    at Array.forEach (&lt;anonymous&gt;)
    at validate (/Users/andy/Development/oa-content/app/node_modules/@babel/core/lib/config/validation/options.js:62:21)
    at loadPrivatePartialConfig (/Users/andy/Development/oa-content/app/node_modules/@babel/core/lib/config/partial.js:28:48)
    at loadFullConfig (/Users/andy/Development/oa-content/app/node_modules/@babel/core/lib/config/full.js:33:37)
    at loadOptions (/Users/andy/Development/oa-content/app/node_modules/@babel/core/lib/config/index.js:18:34)
    at OptionManager.init (/Users/andy/Development/oa-content/app/node_modules/@babel/core/lib/config/index.js:28:12)
    at compile (/Users/andy/Development/oa-content/app/node_modules/@babel/register/lib/node.js:61:42)
    at compileHook (/Users/andy/Development/oa-content/app/node_modules/@babel/register/lib/node.js:102:12)
</code></pre></div>
<p dir="auto">I checked through the code and <code class="notranslate">@babel/register</code> adds the "caller" to the transformOpts which is then passed to the transform function so I really don't know what's going on here. For some reason I just can't get it to work and it's not making a lot of sense.</p>
<p dir="auto"><strong>Expected behavior/code</strong><br>
The next require statement should just work.</p>
<p dir="auto"><strong>Environment</strong></p>
<ul dir="auto">
<li>Babel version(s): ```<br>
├─ @babel/cli@7.0.0-rc.3<br>
├─ @babel/code-frame@7.0.0-beta.42<br>
├─ @babel/core@7.0.0-beta.42<br>
├─ @babel/generator@7.0.0-beta.42<br>
├─ @babel/helper-annotate-as-pure@7.0.0-beta.42<br>
├─ @babel/helper-builder-binary-assignment-operator-visitor@7.0.0-beta.42<br>
├─ @babel/helper-builder-react-jsx@7.0.0-beta.42<br>
├─ @babel/helper-call-delegate@7.0.0-beta.42<br>
├─ @babel/helper-define-map@7.0.0-beta.42<br>
├─ @babel/helper-explode-assignable-expression@7.0.0-beta.42<br>
├─ @babel/helper-function-name@7.0.0-beta.42<br>
├─ @babel/helper-get-function-arity@7.0.0-beta.42<br>
├─ @babel/helper-hoist-variables@7.0.0-beta.42<br>
├─ @babel/helper-module-imports@7.0.0-beta.42<br>
├─ @babel/helper-module-transforms@7.0.0-beta.42<br>
├─ @babel/helper-optimise-call-expression@7.0.0-beta.42<br>
├─ @babel/helper-plugin-utils@7.0.0-beta.42<br>
├─ @babel/helper-regex@7.0.0-beta.42<br>
├─ @babel/helper-remap-async-to-generator@7.0.0-beta.42<br>
├─ @babel/helper-replace-supers@7.0.0-beta.42<br>
├─ @babel/helper-simple-access@7.0.0-beta.42<br>
├─ @babel/helper-split-export-declaration@7.0.0-beta.42<br>
├─ @babel/helper-wrap-function@7.0.0-beta.42<br>
├─ @babel/helpers@7.0.0-beta.42<br>
├─ @babel/highlight@7.0.0-beta.42<br>
├─ @babel/node@7.0.0-rc.3<br>
├─ @babel/plugin-proposal-async-generator-functions@7.0.0-beta.42<br>
├─ @babel/plugin-proposal-class-properties@7.0.0-beta.42<br>
├─ @babel/plugin-proposal-object-rest-spread@7.0.0-beta.42<br>
├─ @babel/plugin-proposal-optional-catch-binding@7.0.0-beta.42<br>
├─ @babel/plugin-proposal-unicode-property-regex@7.0.0-beta.42<br>
├─ @babel/plugin-syntax-async-generators@7.0.0-beta.42<br>
├─ @babel/plugin-syntax-class-properties@7.0.0-beta.42<br>
├─ @babel/plugin-syntax-dynamic-import@7.0.0-beta.42<br>
├─ @babel/plugin-syntax-jsx@7.0.0-beta.42<br>
├─ @babel/plugin-syntax-object-rest-spread@7.0.0-beta.42<br>
├─ @babel/plugin-syntax-optional-catch-binding@7.0.0-beta.42<br>
├─ @babel/plugin-transform-arrow-functions@7.0.0-beta.42<br>
├─ @babel/plugin-transform-async-to-generator@7.0.0-beta.42<br>
├─ @babel/plugin-transform-block-scoped-functions@7.0.0-beta.42<br>
├─ @babel/plugin-transform-block-scoping@7.0.0-beta.42<br>
├─ @babel/plugin-transform-classes@7.0.0-beta.42<br>
├─ @babel/plugin-transform-computed-properties@7.0.0-beta.42<br>
├─ @babel/plugin-transform-destructuring@7.0.0-beta.42<br>
├─ @babel/plugin-transform-dotall-regex@7.0.0-beta.42<br>
├─ @babel/plugin-transform-duplicate-keys@7.0.0-beta.42<br>
├─ @babel/plugin-transform-exponentiation-operator@7.0.0-beta.42<br>
├─ @babel/plugin-transform-for-of@7.0.0-beta.42<br>
├─ @babel/plugin-transform-function-name@7.0.0-beta.42<br>
├─ @babel/plugin-transform-literals@7.0.0-beta.42<br>
├─ @babel/plugin-transform-modules-amd@7.0.0-beta.42<br>
├─ @babel/plugin-transform-modules-commonjs@7.0.0-beta.42<br>
├─ @babel/plugin-transform-modules-systemjs@7.0.0-beta.42<br>
├─ @babel/plugin-transform-modules-umd@7.0.0-beta.42<br>
├─ @babel/plugin-transform-new-target@7.0.0-beta.42<br>
├─ @babel/plugin-transform-object-super@7.0.0-beta.42<br>
├─ @babel/plugin-transform-parameters@7.0.0-beta.42<br>
├─ @babel/plugin-transform-react-display-name@7.0.0-beta.42<br>
├─ @babel/plugin-transform-react-jsx-self@7.0.0-beta.42<br>
├─ @babel/plugin-transform-react-jsx-source@7.0.0-beta.42<br>
├─ @babel/plugin-transform-react-jsx@7.0.0-beta.42<br>
├─ @babel/plugin-transform-regenerator@7.0.0-beta.42<br>
├─ @babel/plugin-transform-runtime@7.0.0-beta.42<br>
├─ @babel/plugin-transform-shorthand-properties@7.0.0-beta.42<br>
├─ @babel/plugin-transform-spread@7.0.0-beta.42<br>
├─ @babel/plugin-transform-sticky-regex@7.0.0-beta.42<br>
├─ @babel/plugin-transform-template-literals@7.0.0-beta.42<br>
├─ @babel/plugin-transform-typeof-symbol@7.0.0-beta.42<br>
├─ @babel/plugin-transform-unicode-regex@7.0.0-beta.42<br>
├─ @babel/polyfill@7.0.0-rc.3<br>
├─ @babel/preset-env@7.0.0-beta.42<br>
├─ @babel/preset-react@7.0.0-beta.42<br>
├─ @babel/register@7.0.0-rc.3<br>
├─ @babel/runtime@7.0.0-beta.42<br>
├─ @babel/template@7.0.0-beta.42<br>
├─ @babel/traverse@7.0.0-beta.42<br>
├─ @babel/types@7.0.0-beta.42<br>
└─ babel-eslint@8.2.5<br>
├─ @babel/code-frame@7.0.0-beta.44<br>
├─ @babel/generator@7.0.0-beta.44<br>
├─ @babel/helper-function-name@7.0.0-beta.44<br>
├─ @babel/helper-get-function-arity@7.0.0-beta.44<br>
├─ @babel/helper-split-export-declaration@7.0.0-beta.44<br>
├─ @babel/highlight@7.0.0-beta.44<br>
├─ @babel/template@7.0.0-beta.44<br>
├─ @babel/traverse@7.0.0-beta.44<br>
└─ @babel/types@7.0.0-beta.44</li>
</ul>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="and"><pre class="notranslate"><code class="notranslate">and
</code></pre></div>
<p dir="auto">├─ babel-code-frame@6.26.0<br>
├─ babel-core@7.0.0-bridge.0<br>
├─ babel-eslint@8.2.5<br>
├─ babel-generator@6.26.1<br>
├─ babel-helper-builder-binary-assignment-operator-visitor@6.24.1<br>
├─ babel-helper-builder-react-jsx@6.26.0<br>
├─ babel-helper-call-delegate@6.24.1<br>
├─ babel-helper-define-map@6.26.0<br>
├─ babel-helper-explode-assignable-expression@6.24.1<br>
├─ babel-helper-function-name@6.24.1<br>
├─ babel-helper-get-function-arity@6.24.1<br>
├─ babel-helper-hoist-variables@6.24.1<br>
├─ babel-helper-optimise-call-expression@6.24.1<br>
├─ babel-helper-regex@6.26.0<br>
├─ babel-helper-remap-async-to-generator@6.24.1<br>
├─ babel-helper-replace-supers@6.24.1<br>
├─ babel-helpers@6.24.1<br>
├─ babel-loader@8.0.0-beta.3<br>
├─ babel-messages@6.23.0<br>
├─ babel-plugin-check-es2015-constants@6.22.0<br>
├─ babel-plugin-react-require@3.0.0<br>
├─ babel-plugin-syntax-async-functions@6.13.0<br>
├─ babel-plugin-syntax-class-properties@6.13.0<br>
├─ babel-plugin-syntax-exponentiation-operator@6.13.0<br>
├─ babel-plugin-syntax-flow@6.18.0<br>
├─ babel-plugin-syntax-jsx@6.18.0<br>
├─ babel-plugin-syntax-object-rest-spread@7.0.0-beta.3<br>
├─ babel-plugin-syntax-trailing-function-commas@6.22.0<br>
├─ babel-plugin-transform-async-to-generator@6.24.1<br>
├─ babel-plugin-transform-class-properties@6.24.1<br>
├─ babel-plugin-transform-es2015-arrow-functions@6.22.0<br>
├─ babel-plugin-transform-es2015-block-scoped-functions@6.22.0<br>
├─ babel-plugin-transform-es2015-block-scoping@6.26.0<br>
├─ babel-plugin-transform-es2015-classes@6.24.1<br>
├─ babel-plugin-transform-es2015-computed-properties@6.24.1<br>
├─ babel-plugin-transform-es2015-destructuring@6.23.0<br>
├─ babel-plugin-transform-es2015-duplicate-keys@6.24.1<br>
├─ babel-plugin-transform-es2015-for-of@6.23.0<br>
├─ babel-plugin-transform-es2015-function-name@6.24.1<br>
├─ babel-plugin-transform-es2015-literals@6.22.0<br>
├─ babel-plugin-transform-es2015-modules-amd@6.24.1<br>
├─ babel-plugin-transform-es2015-modules-commonjs@6.26.2<br>
├─ babel-plugin-transform-es2015-modules-systemjs@6.24.1<br>
├─ babel-plugin-transform-es2015-modules-umd@6.24.1<br>
├─ babel-plugin-transform-es2015-object-super@6.24.1<br>
├─ babel-plugin-transform-es2015-parameters@6.24.1<br>
├─ babel-plugin-transform-es2015-shorthand-properties@6.24.1<br>
├─ babel-plugin-transform-es2015-spread@6.22.0<br>
├─ babel-plugin-transform-es2015-sticky-regex@6.24.1<br>
├─ babel-plugin-transform-es2015-template-literals@6.22.0<br>
├─ babel-plugin-transform-es2015-typeof-symbol@6.23.0<br>
├─ babel-plugin-transform-es2015-unicode-regex@6.24.1<br>
├─ babel-plugin-transform-exponentiation-operator@6.24.1<br>
├─ babel-plugin-transform-flow-strip-types@6.22.0<br>
├─ babel-plugin-transform-object-assign@6.22.0<br>
├─ babel-plugin-transform-object-rest-spread@7.0.0-beta.3<br>
├─ babel-plugin-transform-react-display-name@6.25.0<br>
├─ babel-plugin-transform-react-jsx-self@6.22.0<br>
├─ babel-plugin-transform-react-jsx-source@6.22.0<br>
├─ babel-plugin-transform-react-jsx@6.24.1<br>
├─ babel-plugin-transform-react-remove-prop-types@0.4.13<br>
├─ babel-plugin-transform-regenerator@6.26.0<br>
├─ babel-plugin-transform-strict-mode@6.24.1<br>
├─ babel-preset-env@1.7.0<br>
├─ babel-preset-flow@6.23.0<br>
├─ babel-preset-react@6.24.1<br>
├─ babel-register@6.26.0<br>
│  └─ babel-core@6.26.3<br>
├─ babel-runtime@6.26.0<br>
├─ babel-template@6.26.0<br>
├─ babel-traverse@6.26.0<br>
├─ babel-types@6.26.0<br>
└─ netlify-lambda@0.4.0<br>
├─ babel-core@6.26.3<br>
└─ babel-loader@7.1.4</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Parts of my project use ```@babel/*``` and parts of is use ```babel-*```
- Node/npm version: 9.11.1
- OS: Mac OS X 10.13.6 (17G65)
- Monorepo no
- How you are using Babel: register

**Possible Solution**
I guess it should internally ignore &quot;caller&quot; since it adds it internally."><pre class="notranslate"><code class="notranslate">Parts of my project use ```@babel/*``` and parts of is use ```babel-*```
- Node/npm version: 9.11.1
- OS: Mac OS X 10.13.6 (17G65)
- Monorepo no
- How you are using Babel: register

**Possible Solution**
I guess it should internally ignore "caller" since it adds it internally.
</code></pre></div>
<h2 dir="auto">Bug Report</h2>

<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> I would like to work on a fix!</li>
</ul>

<p dir="auto"><strong>Current behavior</strong></p>

<p dir="auto">Code</p>
<div class="highlight highlight-source-ts notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="declare global { namespace globalThis { var i18n: any; } }

export class i18n {}"><pre class="notranslate"><span class="pl-k">declare</span> global <span class="pl-kos">{</span> <span class="pl-k">namespace</span> <span class="pl-s1">globalThis</span> <span class="pl-kos">{</span> <span class="pl-k">var</span> <span class="pl-s1">i18n</span>: <span class="pl-smi">any</span><span class="pl-kos">;</span> <span class="pl-kos">}</span> <span class="pl-kos">}</span>

<span class="pl-k">export</span> <span class="pl-k">class</span> <span class="pl-smi">i18n</span> <span class="pl-kos">{</span><span class="pl-kos">}</span></pre></div>
<p dir="auto">trigger an scope error:</p>
<div class="highlight highlight-text-adblock notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="    TypeError: Duplicate declaration &quot;i18n&quot;
      1 | declare global { namespace globalThis { var i18n: any; } }
      2 |
    &gt; 3 | export class i18n {}
        |              ^^^^

      249 |     }
      250 | 
    &gt; 251 |     return new Error(msg);
          |            ^
      252 |   }
      253 | 
      254 | }

      at File.buildCodeFrameError (packages/babel-core/lib/transformation/file/file.js:251:12)
      at Scope.checkBlockScopedCollisions (packages/babel-traverse/lib/scope/index.js:422:22)
      at Scope.registerBinding (packages/babel-traverse/lib/scope/index.js:582:16)
      at Scope.registerDeclaration (packages/babel-traverse/lib/scope/index.js:527:12)
      at Object.BlockScoped (packages/babel-traverse/lib/scope/index.js:250:12)
      at Object.newFn (packages/babel-traverse/lib/visitors.js:216:17)
      at NodePath._call (packages/babel-traverse/lib/path/context.js:55:20)
      at NodePath.call (packages/babel-traverse/lib/path/context.js:38:14)
      at NodePath.visit (packages/babel-traverse/lib/path/context.js:90:31)
      at TraversalContext.visitQueue (packages/babel-traverse/lib/context.js:116:16)"><pre class="notranslate">    TypeError: Duplicate declaration "i18n"
      1 | declare global { namespace globalThis { var i18n: any; } }
      2 <span class="pl-k">|</span>
    &gt; 3 | export class i18n {}
        |              <span class="pl-k">^^^^</span>

      249 |     }
      250 | 
    &gt; 251 |     return new Error(msg);
          |            <span class="pl-k">^</span>
      252 |   }
      253 | 
      254 | }

      at File.buildCodeFrameError (packages/babel-core/lib/transformation/file/file.js:251:12)
      at Scope.checkBlockScopedCollisions (packages/babel-traverse/lib/scope/index.js:422:22)
      at Scope.registerBinding (packages/babel-traverse/lib/scope/index.js:582:16)
      at Scope.registerDeclaration (packages/babel-traverse/lib/scope/index.js:527:12)
      at Object.BlockScoped (packages/babel-traverse/lib/scope/index.js:250:12)
      at Object.newFn (packages/babel-traverse/lib/visitors.js:216:17)
      at NodePath._call (packages/babel-traverse/lib/path/context.js:55:20)
      at NodePath.call (packages/babel-traverse/lib/path/context.js:38:14)
      at NodePath.visit (packages/babel-traverse/lib/path/context.js:90:31)
      at TraversalContext.visitQueue (packages/babel-traverse/lib/context.js:116:16)</pre></div>
<ul dir="auto">
<li><a href="https://babeljs.io/repl#?browsers=&amp;build=&amp;builtIns=false&amp;spec=false&amp;loose=false&amp;code_lz=CYUwxgNghgTiAEBzCB7ARlC8De8B2UAtiAM4AOUYCy6mAKgBYCWJO8AbrPEwIwAceAFzwoeAJ4BueAF8ZAKDkgAHmRQwALvEhQSrXgJzSgA&amp;debug=false&amp;forceAllTransforms=false&amp;shippedProposals=false&amp;circleciRepo=&amp;evaluate=false&amp;fileSize=false&amp;timeTravel=false&amp;sourceType=module&amp;lineWrap=true&amp;presets=env%2Ctypescript&amp;prettier=false&amp;targets=&amp;version=7.13.14&amp;externalPlugins=%40babel%2Fplugin-transform-modules-systemjs%407.13.8%2C%40babel%2Fplugin-syntax-top-level-await%407.12.13" rel="nofollow">REPL</a></li>
</ul>
<p dir="auto"><strong>Input Code</strong></p>
<p dir="auto">As described above.</p>
<p dir="auto"><strong>Expected behavior</strong></p>

<p dir="auto">This piece of code is <a href="https://www.typescriptlang.org/play?ssl=3&amp;ssc=21&amp;pln=1&amp;pc=1#code/CYUwxgNghgTiAEBzCB7ARlC8De8B2UAtiAM4AOUYCy6mAKgBYCWJO8AbrPEwIwAceAFzwoeAJ4BueAF8ZAKDkgAHmRQwALvEhQSrXgJzSgA" rel="nofollow">valid</a> in TypeScript.</p>
<p dir="auto"><strong>Babel Configuration (babel.config.js, .babelrc, package.json#babel, cli command, .eslintrc)</strong></p>


<ul dir="auto">
<li>Filename: <code class="notranslate">babel.config.js</code></li>
</ul>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="{
  &quot;presets&quot;: [&quot;@babel/preset-typescript&quot;]
}"><pre class="notranslate"><span class="pl-kos">{</span>
  <span class="pl-s">"presets"</span>: <span class="pl-kos">[</span><span class="pl-s">"@babel/preset-typescript"</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. v7.12.0]</li>
<li>Node/npm version: [e.g. Node 12/npm 7]</li>
<li>OS: [e.g. macOS 10.15.4, Windows 10]</li>
<li>Monorepo: [e.g. yes/no/Lerna]</li>
<li>How you are using Babel: [e.g. <code class="notranslate">webpack</code>, <code class="notranslate">rollup</code>, <code class="notranslate">parcel</code>, <code class="notranslate">babel-register</code>]</li>
</ul>
<p dir="auto"><strong>Possible Solution</strong></p>

<p dir="auto"><strong>Additional context</strong></p>