运行 开发 Nuxtjs 时出错
Error When Running Developement Nuxtjs
我已经安装了 nuxtjs,但是当我尝试 npm 运行 dev 时,我得到了这个错误:
aep@ ~/projects/nuxt-learn $ npm run dev
> nuxt-learn@1.0.0 dev /home/aep/projects/nuxt-learn
> nuxt
/home/aep/projects/nuxt-learn/node_modules/nuxt/lib/core/middleware/nuxt.js:72
const policies = this.options.render.csp.policies ? {...this.options.render.csp.policies} : null
^^^
SyntaxError: Unexpected token ...
at createScript (vm.js:74:10)
at Object.runInThisContext (vm.js:116:10)
at Module._compile (module.js:533:28)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:503:32)
at tryModuleLoad (module.js:466:12)
at Function.Module._load (module.js:458:3)
at Module.require (module.js:513:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/home/aep/projects/nuxt-learn/node_modules/nuxt/lib/core/renderer.js:19:24)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! nuxt-learn@1.0.0 dev: `nuxt`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the nuxt-learn@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/aep/.npm/_logs/2018-03-11T15_02_34_778Z-debug.log
我目前的npm v.5.0.3,node版本是8.1.4,nuxt版本是1.0.0。我在 Linux Mint Rossa 17.3 上开发项目
谁能帮帮我?
这已通过使用最新版本的节点解决:
解决方案:我安装了 node
的 8.10.0
我已经安装了 nuxtjs,但是当我尝试 npm 运行 dev 时,我得到了这个错误:
aep@ ~/projects/nuxt-learn $ npm run dev
> nuxt-learn@1.0.0 dev /home/aep/projects/nuxt-learn
> nuxt
/home/aep/projects/nuxt-learn/node_modules/nuxt/lib/core/middleware/nuxt.js:72
const policies = this.options.render.csp.policies ? {...this.options.render.csp.policies} : null
^^^
SyntaxError: Unexpected token ...
at createScript (vm.js:74:10)
at Object.runInThisContext (vm.js:116:10)
at Module._compile (module.js:533:28)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:503:32)
at tryModuleLoad (module.js:466:12)
at Function.Module._load (module.js:458:3)
at Module.require (module.js:513:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/home/aep/projects/nuxt-learn/node_modules/nuxt/lib/core/renderer.js:19:24)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! nuxt-learn@1.0.0 dev: `nuxt`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the nuxt-learn@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/aep/.npm/_logs/2018-03-11T15_02_34_778Z-debug.log
我目前的npm v.5.0.3,node版本是8.1.4,nuxt版本是1.0.0。我在 Linux Mint Rossa 17.3 上开发项目 谁能帮帮我?
这已通过使用最新版本的节点解决:
解决方案:我安装了 node
的 8.10.0