【问题标题】:Running Aurelia new project failed运行 Aurelia 新项目失败
【发布时间】:2017-09-28 07:45:19
【问题描述】:

我刚刚创建了 Aurelia 新项目,当我运行 au run --watch 时(我按照以下说明操作:http://aurelia.io/hub.html#/doc/article/aurelia/framework/latest/contact-manager-tutorial/1),我从控制台收到了这条消息。我是 JS 的新手,对错误代码一无所知,所以有人能告诉我什么问题吗?

{ uid: 11,
  name: 'writeBundles',
  branch: false,
  error: [SyntaxError: Block-scoped declarations (let, const,function,class) not yet supported outside strict mode],
  duration: [ 1, 536524679 ],
  time: 1493576142781 }

【问题讨论】:

  • 可能是 node.js 版本问题?在控制台中输入node -v 并报告。
  • 控制台输出:v4.2.6
  • 尝试安装最新的 Node.js 版本。如果您这样做,您将不会收到该消息。

标签: aurelia


【解决方案1】:

您需要 node.js 版本 6 及更高版本才能使用 let, const and class 等 es2015 功能

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2022-08-10
    • 2020-10-11
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多