nodejs Unexpected token function

在进行RAP2安装时,koa-logger包报错。
解决办法:升级nodejs版本,7.6+

/home/rap2/rap2-delos/node_modules/koa-logger/index.js:57
  return async function logger (ctx, next) {
               ^^^^^^^^
SyntaxError: Unexpected token function
    at createScript (vm.js:56:10)
    at Object.runInThisContext (vm.js:97:10)
    at Module._compile (module.js:549:28)
    at Object.Module._extensions..js (module.js:586:10)
    at Module.load (module.js:494:32)
    at tryModuleLoad (module.js:453:12)
    at Function.Module._load (module.js:445:3)
    at Module.require (module.js:504:17)
    at require (internal/module.js:20:19)
    at Object. (/home/rap2/rap2-delos/dist/scripts/app.js:13:16)

你可能感兴趣的:(异常及问题)