带有aurelia-cli的aurelia-i18n给出了错误的plugin.load不是函数 [英] aurelia-i18n with aurelia-cli gives error plugin.load is not a function
问题描述
对于使用TypeScript编写的使用aurelia-cli
启动的项目,有人能够成功使用aurelia-i18n
吗?我已经按照github项目doco中的说明尝试了几个项目,但是运行它时浏览器出现错误.
has anyone been able to successfully use aurelia-i18n
with a project started using aurelia-cli
written in TypeScript? I have tried a couple of projects following the instructions in the github project doco, but it comes up with an error in the browser when running it.
vendor-bundle.js:4872 Uncaught TypeError: plugin.load is not a function
at Module.<anonymous> (vendor-bundle.js:4872)
at vendor-bundle.js:3911
at on (vendor-bundle.js:4294)
at Module.callPlugin (vendor-bundle.js:4732)
at Module.fetch (vendor-bundle.js:4601)
at Module.check (vendor-bundle.js:4633)
at Module.enable (vendor-bundle.js:4953)
at Module.<anonymous> (vendor-bundle.js:4776)
at vendor-bundle.js:3911
at vendor-bundle.js:4966
at each (vendor-bundle.js:3836)
at Module.emit (vendor-bundle.js:4965)
at Module.check (vendor-bundle.js:4715)
at Module.enable (vendor-bundle.js:4953)
at Object.enable (vendor-bundle.js:5334)
at Module.callPlugin (vendor-bundle.js:4875)
这似乎与加载后端有关,因为如果我注释掉,我不会得到该错误(翻译显然也不起作用)
It seems to be related to loading the Backend, because if I comment that out I don't get the error (translation obviously doesn't work either)
我尝试了文档中提到的两个后端
I have tried both backends mentioned in the docs
这是我的示例应用代码: https://github.com/gregbacchus/aurelia- i18n-sample
Here is my sample app code: https://github.com/gregbacchus/aurelia-i18n-sample
我非常感谢有人看一下并告诉我我做错了什么.谢谢
I'd greatly appreciate someone taking a look and telling me what I'm doing wrong. Thanks
推荐答案
感谢@ zewa666提供有关gitter的帮助.似乎更改aurelia_project/aurelia.json
将build.loader.plugins.stub
设置为false
可以解决我的问题.
Thanks to @zewa666 for the help on gitter. It seems that altering aurelia_project/aurelia.json
to set build.loader.plugins.stub
to false
fixed my problem.
这篇关于带有aurelia-cli的aurelia-i18n给出了错误的plugin.load不是函数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!