aurelia / dependency-injection

A lightweight, extensible dependency injection container for JavaScript.
MIT License
160 stars 66 forks source link

Bug: The update from 1.5.2 to 1.6.0 is breaking #229

Open TimScholten97 opened 2 months ago

TimScholten97 commented 2 months ago

I'm submitting a bug report

Library Version:
1.6.0

Since the update to 1.6.0, some of my unittests(jest) in my project stopped working.

Loader must implement loadTemplate(url).
      115 |       });
      116 |
    > 117 |       await component.create(bootstrap);
          |       ^
      118 |     });
      129 |
      at Loader.loadTemplate (node_modules/aurelia-loader/dist/commonjs/aurelia-loader.js:119:11)
      at ensureRegistryEntry (node_modules/aurelia-templating/src/view-engine.ts:22:17)
      at ViewEngine.Object.<anonymous>.ViewEngine.loadViewFactory (node_modules/aurelia-templating/src/view-engine.ts:135:12)
      at ConventionalViewStrategy.Object.<anonymous>.ConventionalViewStrategy.loadViewFactory (node_modules/aurelia-templating/src/view-strategy.ts:133:23)
      at HtmlBehaviorResource.Object.<anonymous>.HtmlBehaviorResource.load (node_modules/aurelia-templating/src/html-behavior.ts:306:10)
      at ResourceDescription.Object.<anonymous>.ResourceDescription.load (node_modules/aurelia-templating/src/module-analyzer.ts:210:35)
      at ResourceModule.Object.<anonymous>.ResourceModule.load (node_modules/aurelia-templating/src/module-analyzer.ts:122:23)
      at node_modules/aurelia-templating/src/view-engine.ts:288:41

Downgrading the version back to 1.5.2 fixes this issue!

Please tell us about your environment: Operating System: Linux (Ubuntu 18.04)

Node Version:
14.21.3

Expected/desired behavior: Update should not contain breaking changes.

bigopon commented 2 months ago

Thanks for the issue @TimScholten97. When you upgraded, did you ensure you have no duplicate modules?