-1

I have looked at other similar questions and this error is usually caused by a missing '+' sign when one is adding on text to a text variable or when one has some sort of weird characters. Any suggestions as to how to spot mine? My error is here:

Code is in Node.js

{
  "errorMessage": "Unexpected token ILLEGAL",
  "errorType": "SyntaxError",
  "stackTrace": [
    "Module._compile (module.js:373:25)",
    "Object.Module._extensions..js (module.js:416:10)",
    "Module.load (module.js:343:32)",
    "Function.Module._load (module.js:300:12)",
    "Module.require (module.js:353:17)",
    "require (internal/module.js:12:17)",
    "Object.<anonymous> (/var/task/index.js:9:14)",
    "Module._compile (module.js:409:26)",
    "Object.Module._extensions..js (module.js:416:10)"
  ]
}

In CloudWatch:

Syntax error in module 'index': SyntaxError

at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:373:25)
at Object.Module._extensions..js (module.js:416:10)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)
at Module.require (module.js:353:17)
at require (internal/module.js:12:17)
at Object.<anonymous> (/var/task/index.js:8:14)
at Module._compile (module.js:409:26)
at Object.Module._extensions..js (module.js:416:10)
John Rotenstein
  • 241,921
  • 22
  • 380
  • 470
Diana Vazquez Romo
  • 152
  • 1
  • 1
  • 11

1 Answers1

0

It was due to a ' character after function initialization. Like so:

function formatCompletedCertification(certification) { ´ [function here] }

Diana Vazquez Romo
  • 152
  • 1
  • 1
  • 11