davidlav
davidlav

Reputation: 688

SystemJS can't load aurelia-event-aggregator even though Aurelia has already loaded it

I'm simply trying to import 'aurelia-event-aggregator' into a TypeScript class and I get this error in my console. Even though it says it's loaded and configured aurelia-event-aggregator on lines 5 & 6, it says SystemJS still can't find it. This is especially strange since I'm also (successfully) importing autoinject from 'aurelia-dependency-injection' and customElement from 'aurelia-framework' without a problem, and they seem to be configured/installed identically to the event aggregator on my system via jspm.

My config.js and package.json are here.

I haven't the slightest idea how to start troubleshooting this. Please let me know if there's any other information I can provide.

enter image description here

enter image description here

Upvotes: 1

Views: 89

Answers (1)

Ashley Grant
Ashley Grant

Reputation: 10897

This is going to sound dumb, but you need to run jspm install aurelia-event-aggregator. I know it's already in your project, but jspm 0.16 doesn't support peer dependencies (at least that's what I remember), so you have to explicitly install it as a top level dep for your app and then it will start working.

Upvotes: 3

Related Questions