tfrydrychewicz / aurelia-flux

Flux dispatcher plugin for Aurelia
MIT License
74 stars 17 forks source link

Pipeline step registration fails in Aurelia router 0.10.4. #9

Closed acidbluebriggs closed 9 years ago

acidbluebriggs commented 9 years ago

Current version of plugin (0.1.6) causes application startup failure do to the following error:

Unhandled promise rejection Error: Pipeline steps can only be added to the root router
    at RouterConfiguration.exportToRouter (http://localhost:9000/jspm_packages/github/aurelia/router@0.10.4/aurelia-router.js:896:17)
    at Router.configure (http://localhost:9000/jspm_packages/github/aurelia/router@0.10.4/aurelia-router.js:963:26)
    at Function.AddFluxPipelineStep (http://localhost:9000/jspm_packages/github/tfrydrychewicz/aurelia-flux@0.1.6/router.js:19:14)
    at y.configure (http://localhost:9000/jspm_packages/github/tfrydrychewicz/aurelia-flux@0.1.6/index.js:14:31)
    at http://localhost:9000/jspm_packages/github/aurelia/framework@0.14.0/aurelia-framework.js:25:34
    at run (http://localhost:9000/jspm_packages/npm/core-js@0.9.18/modules/es6.promise.js:91:43)
    at http://localhost:9000/jspm_packages/npm/core-js@0.9.18/modules/es6.promise.js:105:11
    at module.exports (http://localhost:9000/jspm_packages/npm/core-js@0.9.18/modules/$.invoke.js:6:25)
    at queue.(anonymous function) (http://localhost:9000/jspm_packages/npm/core-js@0.9.18/modules/$.task.js:40:9)
    at Number.run (http://localhost:9000/jspm_packages/npm/core-js@0.9.18/modules/$.task.js:27:7)
    at listner (http://localhost:9000/jspm_packages/npm/core-js@0.9.18/modules/$.task.js:31:9)
acidbluebriggs commented 9 years ago

I just noticed that the version I tested against was actually 0.1.5. I updated the stack trace with 0.1.6. This is also using bootstrapper 0.15.0, if that is causing any issues.

A demo of an application which receives this error can be found @ https://github.com/acidbluebriggs/aurelia-flux-example/tree/router-issue

stevies commented 9 years ago

I'm seeing the same problem. Was working fine before update to jspm@beta and latest Aurelia. Now also getting:

Looking up github:tfrydrychewaurelicz/aurelia-flux
err  Repo github:tfrydrychewaurelicz/aurelia-flux not found!

when attempting to do a clean install.

tfrydrychewicz commented 9 years ago

I'll get down to that during the weekend. Thanks for reporting on that :)

tfrydrychewicz commented 9 years ago

That was an issue with aurelia-framework. It's been fixed with 0.14.1. Could you please give it a try with 0.14.1?

stevies commented 9 years ago

Working nicely again. Thanks for the pointer to the latest framework version.

tfrydrychewicz commented 9 years ago

@stevies my pleasure :)