1

My aurelia application stopped working since the 2nd of July with this random error on the catch of:

aurelia.start().then(() => aurelia.setRoot()).catch(reason => console.log(reason));

Error: Invalid resource path [function RouterView(element, container, viewSlot, router, viewLocator, compositionTransaction, compositionEngine) {

  _initDefineProp(this, 'swapOrder', _descriptor, this);

  _initDefineProp(this, 'layoutView', _descriptor2, this);

  _initDefineProp(this, 'layoutViewModel', _descriptor3, this);

  _initDefineProp(this, 'layoutModel', _descriptor4, this);

  this.element = element;
  this.container = container;
  this.viewSlot = viewSlot;
  this.router = router;
  this.viewLocator = viewLocator;
  this.compositionTransaction = compositionTransaction;
  this.compositionEngine = compositionEngine;
  this.router.registerViewPort(this, this.element.getAttribute('name'));

  if (!('initialComposition' in compositionTransaction)) {
    compositionTransaction.initialComposition = true;
    this.compositionTransactionNotifier = compositionTransaction.enlist();
  }
}]. Resources must be specified as relative module IDs.
at FrameworkConfiguration.globalResources (browser-index.ts:30)
at Object.configure (browser-index.ts:30)
at browser-index.ts:30
at tryCatch (browser-index.ts:30)
at invokeCallback (browser-index.ts:30)
at publish (browser-index.ts:30)
at MutationObserver.flush (browser-index.ts:30)
jkdev
  • 11,360
  • 15
  • 54
  • 77
130nk3r5
  • 1,120
  • 10
  • 12

1 Answers1

4

I had the same error. Didn't fully get to the bottom of it but it seems to be related to aurelia-templating-router@1.3.2 and aurelia-templating-resources@1.7.0 which have been published 2 and 3 days ago.

Once I installed aurelia-templating-router@1.3.1 and aurelia-templating-resources@1.6.0 my app came back to life

hankor
  • 390
  • 2
  • 6
  • Thanks. I will check that out and give some feedback today. – 130nk3r5 Jul 06 '18 at 04:08
  • 1
    Pegging these packages to the versions specified here worked for me. That was a simple end to a rather frustrating day of debugging. I'm unclear as to how this also just started happening for us given that I had a `package-lock.json` file that was pegging aurelia-templating-router@1.2.0 and aurelia-templating-resources@1.5.0. Perhaps my lock file was being ignored for some reason. I sure do hate the javascript ecosystem! – Hans L Jul 24 '18 at 13:43