"SyntaxError: Unexpected identifier" when runnning a Nuxt.js project

"SyntaxError: Unexpected identifier" when runnning a Nuxt.js project

我使用:

当我尝试 运行 一个项目时,我得到这个错误:

npm run dev


node_modules/nuxt/lib/core/module.js:14
  async ready() {
        ^^^^^

SyntaxError: Unexpected identifier
    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.<anonymous> (/home/ostap/Стільниця/vue-photogram/node_modules/nuxt/lib/core/index.js:2:16)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! vue-photogram@1.0.0 dev: `nuxt`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the vue-photogram@1.0.0 dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/ostap/.npm/_logs/2018-05-16T16_35_55_903Z-debug.log

这背后的原因是什么以及如何解决?

我的 Node.js 版本太旧了。升级解决了这个问题。