【发布时间】:2018-02-25 12:20:27
【问题描述】:
我使用的是 Ubuntu 16.04.3 LTS,我使用 sudo apt-get install npm node 安装了 npm 和 node。之后我安装了@angular/cli 和sudo npm install @angular/cli -g。
但是当我尝试使用ng new hello-world 创建一个新项目时,它会失败并出现以下错误:
/usr/local/lib/node_modules/@angular/cli/models/config/config.js:17
constructor(_configPath, schema, configJson, fallbacks = []) {
^
SyntaxError: Unexpected token =
at exports.runInThisContext (vm.js:53:16)
如何使ng new 工作?
【问题讨论】: