我正在尝试转换Aurelia项目并遇到问题。我安装了aurelia-auth并在aurelia.json文件中配置它:
{
"name": "aurelia-auth",
"path": "../node_modules/aurelia-auth/src",
"main": "aurelia-auth"
}
当我尝试使用au-cli运行应用程序时,我遇到了一系列错误:
commonJs.convert: COULD NOT CONVERT: C:/Development/UCCSS/aurelia-v1- uccss/node_modules/aurelia-auth/src/aurelia-auth.js, so skipping it. Error was: Error: Line 1: Unexpected token
{ uid: 10,
name: 'writeBundles',
branch: false,
error:
{ [Error: Parse error using esprima for file: C:/Development/UCCSS/aurelia-v1-uccss/node_modules/aurelia-auth/src/aurelia-auth.js
Error: Line 1: Unexpected token]
moduleTree: [ 'config/routerConfig' ],
fileName: 'C:/Development/UCCSS/aurelia-v1-uccss/src/config/routerConfig.js' },
duration: [ 0, 925164337 ],
time: 1470156183228 }
aurelia-auth是否有可能因Aurelia的最新版本而被打破,或者有办法解决这个问题吗?
谢谢,
罗斯
答案 0 :(得分:0)
我可以通过将配置更改为:
来使其工作{
"name": "aurelia-auth",
"path": "../node_modules/aurelia-auth/dist/amd",
"main": "aurelia-auth"
}