# Error: Conflicting reflect.metadata polyfill found

**URL:** <https://discourse.aurelia.io/t/error-conflicting-reflect-metadata-polyfill-found/4459>\
**Category:** Help Requests\
**Created:** [October 31, 2021, 4:12am UTC](https://discourse.aurelia.io/t/error-conflicting-reflect-metadata-polyfill-found/4459 "2021-10-31T04:12:01Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![manks](https://yyz1.discourse-cdn.com/flex027/user_avatar/discourse.aurelia.io/manks/32/1995_2.png) [@manks](https://discourse.aurelia.io/u/manks)\
**Post date:** [October 31, 2021, 4:12am UTC](https://discourse.aurelia.io/t/error-conflicting-reflect-metadata-polyfill-found/4459/1 "2021-10-31T04:12:01Z")

</div>

I updated my packages to latest, and I’m getting the following:

```auto
index.js?8978:527 Uncaught (in promise) Error: Conflicting reflect.metadata polyfill found. If you have 'reflect-metadata' or any other reflect polyfill imported, please remove it, if not (or if you must use a specific polyfill) please file an issue at https://github.com/aurelia/aurelia/issues so that we can look into compatibility options for this scenario. Implementation summary:

metadata:
function (metadataKey, metadataValue) {
      return function (target, targetKey) {
        Reflect....

defineMetadata:
function (metadataKey, metadataValue, target, targetKey) {
      var metadataContainer = target.hasO...

getOwnMetadata:
function (metadataKey, target, targetKey) {
      if (target.hasOwnProperty(metadataContainerKey)) {...
    at applyMetadataPolyfill (index.js?8978:527)
    at eval (di.js?eadc:2)
    at Module../node_modules/@aurelia/kernel/dist/native-modules/di.js (vendors~cb931f6e.091214a8336b64f777e5.chunk.js:71)
    at __webpack_require__ (runtime~app.091214a8336b64f777e5.bundle.js:849)
    at fn (runtime~app.091214a8336b64f777e5.bundle.js:151)
    at eval (platform.js?620e:1)
    at Module../node_modules/@aurelia/kernel/dist/native-modules/platform.js (vendors~cb931f6e.091214a8336b64f777e5.chunk.js:143)
    at __webpack_require__ (runtime~app.091214a8336b64f777e5.bundle.js:849)
    at fn (runtime~app.091214a8336b64f777e5.bundle.js:151)
    at eval (index.js?3116:1)

```

`npm ls`:

```auto
├── @aurelia/fetch-client@0.9.0
├── @popperjs/core@2.10.2
├── @types/bootstrap@5.1.6
├── @types/gulp@4.0.9
├── @types/jest@26.0.24
├── @types/jquery@3.5.8
├── @types/node@16.11.6
├── @types/webpack@4.41.31
├── @typescript-eslint/eslint-plugin@4.33.0
├── @typescript-eslint/parser@4.33.0
├── app-settings-loader@2.0.2
├── aurelia-animator-css@1.0.4
├── aurelia-bootstrapper@2.3.3
├── aurelia-cli@2.0.3
├── aurelia-loader-nodejs@1.1.0
├── aurelia-pal-nodejs@2.0.0
├── aurelia-testing@1.0.0
├── aurelia-webpack-plugin@4.0.0
├── autoprefixer@10.4.0
├── babel-eslint@10.1.0
├── bindings@1.5.0 extraneous
├── bootstrap@5.1.3
├── clean-webpack-plugin@3.0.0
├── copy-webpack-plugin@6.4.1
├── css-loader@5.2.7
├── cssnano@4.1.11
├── cypress@6.9.1
├── duplicate-package-checker-webpack-plugin@3.0.0
├── eslint-plugin-cypress@2.12.1
├── eslint@7.32.0
├── expose-loader@1.0.3
├── file-loader@6.2.0
├── file-uri-to-path@1.0.0 extraneous
├── gulp-eslint@6.0.0
├── gulp@4.0.2
├── html-loader@1.3.2
├── html-webpack-plugin@4.5.2
├── istanbul-instrumenter-loader@3.0.1
├── jest-cli@26.6.3
├── jest-transform-stub@2.0.0
├── jest@26.6.3
├── jquery@3.6.0
├── json-loader@0.5.7
├── mini-css-extract-plugin@1.6.2
├── minimatch@3.0.4
├── nan@2.15.0 extraneous
├── postcss-loader@4.3.0
├── postcss@8.3.11
├── promise-polyfill@8.2.1
├── sass-loader@10.2.0
├── sass@1.43.4
├── style-loader@2.0.0
├── tree-kill@1.2.2
├── ts-jest@26.5.6
├── ts-loader@8.3.0
├── typescript@4.4.4
├── url-loader@4.1.1
├── webpack-bundle-analyzer@4.5.0
├── webpack-cli@3.3.12
├── webpack-dev-server@3.11.2
└── webpack@4.46.0

```

Is there a problem with one of the Aurelia packages that I should downgrade?

UPDATE. So, following [this workaround](https://github.com/aurelia/aurelia/pull/907) “fixes” the issue. Is this standard going forward?

```javascript
import {Aurelia} from 'aurelia-framework';
import * as environment from './config/environment.json';
import {PLATFORM} from 'aurelia-pal';
import * as Bootstrap from 'bootstrap';
import { applyMetadataPolyfill } from '@aurelia/metadata';

export function configure(aurelia: Aurelia): void {

  applyMetadataPolyfill(Reflect, false, true, false, false);

  aurelia.use
    .standardConfiguration()
    .feature(PLATFORM.moduleName('resources/index'));

  aurelia.use.developmentLogging(environment.debug ? 'debug' : 'warn');

  if (environment.testing) {
    aurelia.use.plugin(PLATFORM.moduleName('aurelia-testing'));
  }

  aurelia.start().then(() => aurelia.setRoot(PLATFORM.moduleName('view/app')));
}

```

---

<div class="post-metadata">

**Author:** ![bigopon](https://yyz1.discourse-cdn.com/flex027/user_avatar/discourse.aurelia.io/bigopon/32/18_2.png) [@bigopon](https://discourse.aurelia.io/u/bigopon)\
**Post date:** [November 12, 2021, 3:29am UTC](https://discourse.aurelia.io/t/error-conflicting-reflect-metadata-polyfill-found/4459/2 "2021-11-12T03:29:09Z")

</div>

Maybe use `aurelia-metadata` for now, `@aurelia/metadata` is for v2, and hasn’t been verified with v1 usages, since there could be some duplications. Though if you are using latest version of alpha, the error should go away
