I updated my packages to latest, and Iβm getting the following:
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
:
βββ @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 βfixesβ the issue. Is this standard going forward?
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')));
}