我正在尝试转换一个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版本中被破坏了,或者有没有办法修复这个问题?
谢谢,
罗斯
发布于 2016-08-03 02:02:18
我可以通过将配置更改为:
{
"name": "aurelia-auth",
"path": "../node_modules/aurelia-auth/dist/amd",
"main": "aurelia-auth"
}https://stackoverflow.com/questions/38727308
复制相似问题