question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Duplicate plugin/preset detected

See original GitHub issue

👋, with 0.16.1 the following error throws on rebuild

(node:59760) UnhandledPromiseRejectionWarning: ModuleBuildError: Module build failed (from /Users/bobisjan/Developer/zonky-app/node_modules/babel-loader/lib/index.js):
(node:59760) UnhandledPromiseRejectionWarning: ModuleBuildError: Module build failed (from /Users/bobisjan/Developer/zonky-app/node_modules/babel-loader/lib/index.js):
Error: Duplicate plugin/preset detected.
If you'd like to use two separate instances of a plugin,
they need separate names, e.g.

  plugins: [
    ['some-plugin', {}],
    ['some-plugin', {}, 'some unique name'],
  ]

Duplicates detected are:
[
  {
    "alias": "/Users/bobisjan/Developer/zonky-app/node_modules/@babel/plugin-proposal-optional-chaining/lib/index.js",
    "dirname": "/Users/bobisjan/Developer/zonky-app",
    "ownPass": false,
    "file": {
      "request": "/Users/bobisjan/Developer/zonky-app/node_modules/@babel/plugin-proposal-optional-chaining/lib/index.js",
      "resolved": "/Users/bobisjan/Developer/zonky-app/node_modules/@babel/plugin-proposal-optional-chaining/lib/index.js"
    }
  },
  {
    "alias": "/Users/bobisjan/Developer/zonky-app/node_modules/@babel/plugin-proposal-optional-chaining/lib/index.js",
    "dirname": "/Users/bobisjan/Developer/zonky-app",
    "ownPass": false,
    "file": {
      "request": "/Users/bobisjan/Developer/zonky-app/node_modules/@babel/plugin-proposal-optional-chaining/lib/index.js",
      "resolved": "/Users/bobisjan/Developer/zonky-app/node_modules/@babel/plugin-proposal-optional-chaining/lib/index.js"
    }
  }
]
    at assertNoDuplicates (/Users/bobisjan/Developer/zonky-app/node_modules/@babel/core/lib/config/config-descriptors.js:206:13)
    at createDescriptors (/Users/bobisjan/Developer/zonky-app/node_modules/@babel/core/lib/config/config-descriptors.js:114:3)
    at createPluginDescriptors (/Users/bobisjan/Developer/zonky-app/node_modules/@babel/core/lib/config/config-descriptors.js:105:10)
    at alias (/Users/bobisjan/Developer/zonky-app/node_modules/@babel/core/lib/config/config-descriptors.js:63:53)
    at cachedFunction (/Users/bobisjan/Developer/zonky-app/node_modules/@babel/core/lib/config/caching.js:62:27)
    at cachedFunction.next (<anonymous>:null:null)
    at evaluateSync (/Users/bobisjan/Developer/zonky-app/node_modules/gensync/index.js:244:28)
    at sync (/Users/bobisjan/Developer/zonky-app/node_modules/gensync/index.js:84:14)
    at plugins.plugins (/Users/bobisjan/Developer/zonky-app/node_modules/@babel/core/lib/config/config-descriptors.js:28:77)
    at mergeChainOpts (/Users/bobisjan/Developer/zonky-app/node_modules/@babel/core/lib/config/config-chain.js:319:26)
    at /Users/bobisjan/Developer/zonky-app/node_modules/@babel/core/lib/config/config-chain.js:283:7
    at Generator.next (<anonymous>:null:null)
    at buildRootChain (/Users/bobisjan/Developer/zonky-app/node_modules/@babel/core/lib/config/config-chain.js:68:36)
    at buildRootChain.next (<anonymous>:null:null)
    at loadPrivatePartialConfig (/Users/bobisjan/Developer/zonky-app/node_modules/@babel/core/lib/config/partial.js:95:62)
    at loadPrivatePartialConfig.next (<anonymous>:null:null)
    at Function.<anonymous> (/Users/bobisjan/Developer/zonky-app/node_modules/@babel/core/lib/config/partial.js:120:25)
    at Generator.next (<anonymous>:null:null)
    at evaluateSync (/Users/bobisjan/Developer/zonky-app/node_modules/gensync/index.js:244:28)
    at Function.sync (/Users/bobisjan/Developer/zonky-app/node_modules/gensync/index.js:84:14)
    at Object.<anonymous> (/Users/bobisjan/Developer/zonky-app/node_modules/@babel/core/lib/config/index.js:41:61)
    at Object.<anonymous> (/Users/bobisjan/Developer/zonky-app/node_modules/babel-loader/lib/index.js:151:26)
    at Generator.next (<anonymous>:null:null)
    at asyncGeneratorStep (/Users/bobisjan/Developer/zonky-app/node_modules/babel-loader/lib/index.js:3:103)
    at _next (/Users/bobisjan/Developer/zonky-app/node_modules/babel-loader/lib/index.js:5:194)
    at /Users/bobisjan/Developer/zonky-app/node_modules/babel-loader/lib/index.js:5:364
    at new Promise (<anonymous>:null:null)
    at Object.<anonymous> (/Users/bobisjan/Developer/zonky-app/node_modules/babel-loader/lib/index.js:5:97)
    at Object.loader (/Users/bobisjan/Developer/zonky-app/node_modules/babel-loader/lib/index.js:64:18)
    at Object.<anonymous> (/Users/bobisjan/Developer/zonky-app/node_modules/babel-loader/lib/index.js:59:12)
    at runLoaders (/Users/bobisjan/Developer/zonky-app/node_modules/@embroider/webpack/node_modules/webpack/lib/NormalModule.js:316:20)
    at /Users/bobisjan/Developer/zonky-app/node_modules/loader-runner/lib/LoaderRunner.js:367:11
    at /Users/bobisjan/Developer/zonky-app/node_modules/loader-runner/lib/LoaderRunner.js:233:18
    at context.callback (/Users/bobisjan/Developer/zonky-app/node_modules/loader-runner/lib/LoaderRunner.js:111:13)
    at loader.call.then.err (/Users/bobisjan/Developer/zonky-app/node_modules/babel-loader/lib/index.js:59:103)

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:10 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
NullVoxPopulicommented, Jun 6, 2020

output of yarn why, if that helps

$ yarn why @babel/plugin-proposal-optional-chaining
yarn why v1.22.4
[1/4] Why do we have the module "@babel/plugin-proposal-optional-chaining"...?
[2/4] Initialising dependency graph...
[3/4] Finding dependency...
[4/4] Calculating file sizes...
=> Found "@babel/plugin-proposal-optional-chaining@7.10.1"
info Reasons this module exists
   - "_project_#ember-cli-typescript" depends on it
   - Hoisted from "_project_#ember-cli-typescript#@babel#plugin-proposal-optional-chaining"
   - Hoisted from "_project_#ember-cli-babel#@babel#preset-env#@babel#plugin-proposal-optional-chaining"
   - Hoisted from "_project_#emberclear#@embroider#webpack#@babel#plugin-proposal-optional-chaining"
Read more comments on GitHub >

github_iconTop Results From Across the Web

Babel 7 fails with single plugin saying "Duplicate plugin/preset ...
This is a babel error basically saying that you have defined your plugin @babel/plugin-transform-regenerator twice - more or less indirectly ...
Read more >
Error: Duplicate plugin/preset detected. · Issue #9840 - GitHub
Error : Duplicate plugin/preset detected. If you'd like to use two separate instances of a plugin, they need separate names, e.g.. plugins: [...
Read more >
Babel error Duplicate plugin/preset detected (Trying ... - Reddit
I found some information where it says: most likely cause of the error mentioned is that you have one or more default plugins...
Read more >
Babel 7 fails with single plugin saying "Duplicate plugin/preset ...
This is a babel error basically saying that you have defined your plugin @babel/plugin-transform-regenerator twice - more or less indirectly. Parcel Bundler ...
Read more >
Jest with Cypress coverage for full-stack web applications
babelrc will lead to Duplicate plugin/preset detected. error when running Jest testing. So one quick solution is to add the istanbul plugin to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found