0

我正在尝试转换 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 是否可能破坏了 aurelia-auth,或者有没有办法解决这个问题?

谢谢,

罗斯

4

1 回答 1

0

我能够通过将配置更改为:

{
  "name": "aurelia-auth",
  "path": "../node_modules/aurelia-auth/dist/amd",
  "main": "aurelia-auth"
}
于 2016-08-02T18:02:17.880 回答