I’m in the process of updating an existing app using (Aurelia Framework 1.1.4) to the latest version of Aurelia. This is a business app therefore IE11 is still supported.
I created an App using the CLI then added the various pieces I use in the existing app, validation, dialog, etc to the app created with CLI.
The irony is that I had this working, dialog and validation. In my arrogance I did not save what I had, instead I just copied over the src
folder from my existing app then I started to get an error:
Possible Unhandled Promise Rejection: ReferenceError: 'Promise' is undefined
When I started over I can’t get Aurelia Dialog working again. I don’t know what I did in the first place to get it to work. I searched the internet high and low but can’t find anything, which is odd because the problem is easy to reproduce. Create a new app, add aurelia-dialog, change main.ts that is all it takes.
CLI Version
Global aurelia-cli v1.2.3
Here is my setup
Would you like to use the default setup or customize your choices? · Custom App
Which bundler would you like to use? · Webpack
Which HTTP Protocol do you wish the outputted Webpack bundle to be optimised for? · HTTP/1.1
What platform are you targeting? · Web
What transpiler would you like to use? · TypeScript
How would you like to setup your HTML template? · None
What css preprocessor would you like to use? · None
Do you want to add PostCSS processing · None
Which unit test runner would you like to use? · None
Would you like to configure integration testing? · None
What is your default code editor? · Visual Studio Code
Which features do you want scaffolded into your project? · Minimum
Would you like to add a Dockerfile? · No
After that I do
au run
I get
Hellow world!
I then install Aureila Dialog
npm install aurelia-dialog
Installs 2.0.0
Add the following to main.ts
.plugin(PLATFORM.moduleName('aurelia-dialog'))
Which looks like this
aurelia.use
.standardConfiguration()
.plugin(PLATFORM.moduleName('aurelia-dialog'))
.feature(PLATFORM.moduleName('resources/index'));
do au run
load the page and I get this
DOM7011: The code on this page disabled back and forward caching. For more information, see: http://go.microsoft.com/fwlink/?LinkID=291337
192.168.1.17:8081
HTML1300: Navigation occurred.
192.168.1.17:8081
[WDS] Live Reloading enabled.
DEBUG [aurelia] Loading plugin aurelia-templating-binding.
DEBUG [aurelia] Configured plugin aurelia-templating-binding.
DEBUG [aurelia] Loading plugin aurelia-templating-resources.
DEBUG [aurelia] Configured plugin aurelia-templating-resources.
DEBUG [aurelia] Loading plugin aurelia-event-aggregator.
DEBUG [aurelia] Configured plugin aurelia-event-aggregator.
DEBUG [aurelia] Loading plugin aurelia-history-browser.
DEBUG [aurelia] Configured plugin aurelia-history-browser.
DEBUG [aurelia] Loading plugin aurelia-templating-router.
DEBUG [aurelia] Configured plugin aurelia-templating-router.
DEBUG [aurelia] Loading plugin aurelia-dialog.
Possible Unhandled Promise Rejection: ReferenceError: 'Promise' is undefined
"Possible Unhandled Promise Rejection:"
{
[functions]: ,
__proto__: { },
__symbol:hasInstance0.29453283920868646: undefined,
__symbol:isConcatSpreadable0.29453283920868647: undefined,
__symbol:iterator0.29453283920868641: undefined,
__symbol:match0.29453283920868642: undefined,
__symbol:replace0.29453283920868643: undefined,
__symbol:search0.29453283920868644: undefined,
__symbol:species0.29453283920868649: undefined,
__symbol:split0.29453283920868645: undefined,
__symbol:toPrimitive0.294532839208686410: undefined,
__symbol:toStringTag0.294532839208686411: undefined,
__symbol:unscopables0.29453283920868648: undefined,
description: "'Promise' is undefined",
message: "'Promise' is undefined",
name: "ReferenceError",
number: -2146823279,
stack: "ReferenceError: 'Promise' is undefined
at requireEnsure (http://192.168.1.17:8081/runtime~app.087ff77d9b7fd2b9c076.bundle.js:110:14)
at RENDERRERS.ux (eval code:37:23)
at DialogConfiguration.prototype._apply (eval code:62:9)
at Anonymous function (eval code:56:35)
at configure (eval code:268:5)
at Anonymous function (eval code:626:9)
at Anonymous function (eval code:59:7)"
}