【问题标题】:Vuepress Unexpected TokenVuepress 意外令牌
【发布时间】:2018-11-19 07:44:05
【问题描述】:

我最近用

全局安装了 vuepress
npm install -g vuepress  

当我运行 vuepress -v 时,它显示 0.10.1
但是当我运行vuepress dev 时,它显示:

/usr/local/lib/node_modules/vuepress/bin/vuepress.js:17
const { dev, build, eject } = require('../lib')
  ^

SyntaxError: Unexpected token {
    at exports.runInThisContext (vm.js:53:16)
    at Module._compile (module.js:374:25)
    at Object.Module._extensions..js (module.js:417:10)
    at Module.load (module.js:344:32)
    at Function.Module._load (module.js:301:12)
    at Function.Module.runMain (module.js:442:10)
    at startup (node.js:136:18)
    at node.js:966:3

【问题讨论】:

    标签: vuepress


    【解决方案1】:

    我刚才也遇到了同样的问题,是node js版本过时造成的。

    也许你应该用node -v检查你的节点版本

    根据https://vuepress.vuejs.org/

    VuePress 需要 Node.js >= 8。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2019-08-06
      • 2014-11-29
      • 2017-04-17
      • 2019-05-26
      • 2014-02-19
      • 2022-01-08
      • 2017-03-15
      • 2021-03-19
      相关资源
      最近更新 更多