我正在将aurelia
项目转换为使用aurelia-cli
。
我向aurelia-18n, i18n and i18next-xhr-backend
添加了aurelia-json
但是当我运行'au build'
时,我收到了错误:
{ uid: 8,
name: 'writeBundles',
branch: false,
error:
{ [Error: ENOENT: no such file or directory, open 'd:\aurelia\src\relativeTim
e.js']
errno: -4058,
code: 'ENOENT',
syscall: 'open',
path: 'd:\\aurelia\\src\\relativeTime.js',
moduleTree: [ 'aurelia-i18n' ],
fileName: 'd:/aurelia/node_modules/aurelia-i18n/dist/amd/aurelia-i18n.js' }
,
duration: [ 1, 757878244 ],
time: 1469807422109 }
我如何克服它?我没有使用relativeTime
,尝试添加它,但它需要cldr-data
,它将240Mb带到node_modules
并且仍然存在问题。
答案 0 :(得分:1)
我已经获得了如何使用aurelia-cli配置i18n的建议,并且它有效:
{ "name": "aurelia-i18n", "path": "../node_modules/aurelia-i18n/dist/amd", "main": "index" }, { "name": "i18next-xhr-backend", "path": "../node_modules/i18next-xhr-backend/dist/umd", "main": "i18nextXHRBackend" }, { "name": "i18next", "path": "../node_modules/i18next/dist/umd", "main": "i18next" },