我的aurelia应用程序自7月2日起停止工作,并出现以下随机错误:
aurelia.start().then(() => aurelia.setRoot()).catch(reason => console.log(reason));
错误:无效的资源路径[功能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)
答案 0 :(得分:3)
我有同样的错误。尚未完全深入,但似乎与2天和3天前发布的aurelia-templating-router@1.3.2和aurelia-templating-resources@1.7.0有关。
一旦我安装了aurelia-templating-router@1.3.1和aurelia-templating-resources@1.6.0,我的应用就会恢复正常