Updating to aurelia-dialog@2.0.0 breaks application

I tried updating our aurelia web app to aurelia-dialog version 2.0.0
But it wont boot up anymore, with following error in the console. Anybody an idea what went wrong?

Unhandled rejection TypeError: Cannot read property ‘hasOwnProperty’ of undefined at Object.Reflect.defineMetadata (npm/aurelia-polyfills@1.3.4/aurelia-polyfills.js:840:40) at Object.define (npm/aurelia-metadata@1.0.6/aurelia-metadata.js:59:15) at eval (npm/aurelia-templating@1.10.2/aurelia-templating.js:5162:33) at eval /dist/main.js:36:50) at r.configure (npm/aurelia-dialog@2.0.0/aurelia-dialog.js:243:11) at eval (npm/aurelia-framework@1.3.1/aurelia-framework.js:298:36) at r (bluebird@3.5.3/js/browser/bluebird.min.js:33:9669)

1 Like

Oops, missed this. Have you found any solution @tomunifly?

Hi
no no solution yet
it originates from the plugin configuration, where we override the view of the dialog. UxDialog is undefined

import {UxDialog} from “aurelia-dialog”;

.plugin(‘aurelia-dialog’, config => {
useView(‘ai-dialog.html’)(UxDialog);

1 Like

From the error message in the post, it looks like you got polyfill errors when updating. Can you share the import in your main file? Maybe some modules are being referenced too early

thanks for the answer @bigopon - did you check my reply?
We are using the UxDialog, UxDialogBody, UxDialogFooter UxDialogHeader objects, which used to be exported before 2.0. Now they are not anymore.

1 Like

May I know how you are using them?

We use them as the simple workaround to use bootstrap dialog css on the aurelia dialog explained here:

1 Like

I see, thanks for the pointer. If you want to import the resources, instead of:

import { UxDialogHeader } from 'aurelia-dialog';

You should do:

import { UxDialogHeader } from 'aurelia-dialog/ux-dialog-header';

Can you try that :point_up:

tried it, but not success