0

I'm trying to convert an Aurelia project and have run into a problem. I installed aurelia-auth and configured it in the aurelia.json file as: { "name": "aurelia-auth", "path": "../node_modules/aurelia-auth/src", "main": "aurelia-auth" }

When I try to run the app using the au-cli I get a series of errors like this:

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 }

Is it possible that aurelia-auth was broken with the latest release of Aurelia or is there a way to fix this?

Thanks,

Ross

Ross
  • 101
  • 1
  • 8

1 Answers1

0

I was able to get it to work by changing the config to:

{
  "name": "aurelia-auth",
  "path": "../node_modules/aurelia-auth/dist/amd",
  "main": "aurelia-auth"
}
Matthew James Davis
  • 12,134
  • 7
  • 61
  • 90
Ross
  • 101
  • 1
  • 8