【问题标题】:nuxt.js installation: error while create project with command line tool SyntaxError: Unexpected token )nuxt.js 安装:使用命令行工具创建项目时出错 SyntaxError: Unexpected token )
【发布时间】:2018-05-05 22:28:45
【问题描述】:

我正在尝试使用 nuxt cli 安装 nuxt.js 入门项目

1)全局安装vue clinpm install -g vue-cli

2) 使用vue init nuxt-community/starter-template vuetuts创建项目

但我收到以下错误

/home/user/.nvm/v0.10.36/lib/node_modules/vue-cli/bin/vue-init:35
program.on('--help', () => {
                      ^
SyntaxError: Unexpected token )
    at Module._compile (module.js:439:25)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Function.Module.runMain (module.js:497:10)
    at startup (node.js:119:16)
    at node.js:929:3

【问题讨论】:

    标签: javascript node.js express vue.js nuxt.js


    【解决方案1】:

    这种语法被称为“箭头函数”,并且不受 0.10 等古老(和 EOL)版本节点的支持。

    尝试升级到节点 4 或更高版本,vue-cli 包应该可以正常工作。

    【讨论】:

      猜你喜欢
      • 2020-06-02
      • 1970-01-01
      • 2018-12-15
      • 1970-01-01
      • 1970-01-01
      • 2013-10-04
      • 1970-01-01
      • 1970-01-01
      • 2020-08-18
      相关资源
      最近更新 更多