Skip to content

Duplicate plugin/preset detected. In Ember engine's inside inRepoEngine /test_client/lib/test-admin/index.js #427

@raghu069

Description

@raghu069

In test_client/package.json

"ember-cli-babel": "^8.2.0",
"ember-cli-code-coverage": "^3.0.1",

In test_client/ember-cli-build.js

 let app = new EmberAddon(defaults, {
    // Add options here
    autoImport: {
      insertScriptsAt: 'auto-import-scripts',
      webpack: {
        externals: {
          'jquery': 'jQuery'
        }
      }
    },
    babel: {
      plugins: [...require('ember-cli-code-coverage').buildBabelPlugin()]
    },

In test_client/index.js

included(app) {
    this._super.included.apply(this, arguments);
    if (this.project.pkg.name === this.name) {
        this.options.babel.plugins.push(...require('ember-cli-code-coverage').buildBabelPlugin());
    }
}

The below one is added In /test_client/lib/test-admin/index.js [In repo Engine]

included: function(/* app */) {
    this._super.included.apply(this, arguments);
    if (this.project.pkg.name === this.name) {
      this.options.babel.plugins.push(...require('ember-cli-code-coverage').buildBabelPlugin()); //NO I18N
    }
  },

But it show 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'], ] " error

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions