Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Duplicate plugin/preset detected when running the coverage #222

Closed
srini88 opened this issue Sep 25, 2019 · 3 comments
Closed

Duplicate plugin/preset detected when running the coverage #222

srini88 opened this issue Sep 25, 2019 · 3 comments

Comments

@srini88
Copy link

srini88 commented Sep 25, 2019

Hello,

When I'm running COVERAGE=true ember test inside my addon directory, I'm encountering the below error

Build Error (broccoli-persistent-filter:Babel > [Babel: context]) in context/actions/context-creators.js

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'],
  ]

    at assertNoDuplicates (/home/sv/workspace/pvs/node_modules/@babel/core/lib/config/config-descriptors.js:205:13)
    at createDescriptors (/home/sv/workspace/pvs/node_modules/@babel/core/lib/config/config-descriptors.js:114:3)
    at createPluginDescriptors (/home/sv/workspace/pvs/node_modules/@babel/core/lib/config/config-descriptors.js:105:10)
    at alias (/home/sv/workspace/pvs/node_modules/@babel/core/lib/config/config-descriptors.js:63:49)
    at cachedFunction (/home/sv/workspace/pvs/node_modules/@babel/core/lib/config/caching.js:33:19)
    at plugins.plugins (/home/sv/workspace/pvs/node_modules/@babel/core/lib/config/config-descriptors.js:28:77)
    at mergeChainOpts (/home/sv/workspace/pvs/node_modules/@babel/core/lib/config/config-chain.js:319:26)
    at /home/sv/workspace/pvs/node_modules/@babel/core/lib/config/config-chain.js:283:7
    at buildRootChain (/home/sv/workspace/pvs/node_modules/@babel/core/lib/config/config-chain.js:68:29)
    at loadPrivatePartialConfig (/home/sv/workspace/pvs/node_modules/@babel/core/lib/config/partial.js:85:55)


Stack Trace and Error Report: /tmp/error.dump.1255fbe0311d73a7e380da092b925705.log

The stack trace does not have any useful information. I found this PR ember-m3/ember-m3#386 and babel/babel#10419 and tried to console log the conflicts in the file packages/babel-core/src/config/config-descriptors.js. It printed name as undefined and I was not able to figure out which plugin is causing the conflict.

Buildingconflicts: [ { name: undefined,
    alias: 'base$14',
    value: { [Function] baseDir: [Function] },
    options: { exclude: [Array], include: [Array] },
    dirname:
     '/home/Desktop/Projects/code/admin-source-management',
    ownPass: false,
    file: undefined },
  { name: undefined,
    alias: 'base$15',
    value: { [Function] baseDir: [Function] },
    options: { exclude: [Array], include: [Array] },
    dirname:
     '/home/Desktop/Projects/code/admin-source-management',
    ownPass: false,
    file: undefined },
  { name: undefined,
    alias: 'base$16',
    value: { [Function] baseDir: [Function] },
    options: { exclude: [Array], include: [Array] },
    dirname:
     '/home/Desktop/Projects/code/admin-source-management',
    ownPass: false,
    file: undefined } ]

Environment

  • Babel version(s): 7.9.0
  • Node/npm version: Node 10.15.3/npm 6.4.1
@srini88
Copy link
Author

srini88 commented Nov 19, 2019

@kategengler any thoughts on this?

@benwalder
Copy link

upgrade to v1 beta 8 fixed this for me

@srini88
Copy link
Author

srini88 commented Feb 22, 2020

ember-cli-htmlbars was the culprit for me. ember-cli/ember-cli-htmlbars#297

This issue is fixed after upgrading ember-cli-htmlbars to 4.0.5.

@srini88 srini88 closed this as completed Feb 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants