gpt4 book ai didi

angular-cli - Angular CLI更新后出现错误

转载 作者:行者123 更新时间:2023-12-03 11:37:14 27 4
gpt4 key购买 nike

我的 angular-cli 版本是 beta.16

我尝试通过以下命令进行更新

npm uninstall -g angular-cli @angular/cli
npm cache clean
npm install -g @angular/cli@latest

成功安装后,当我尝试运行任何ng命令时
ng version 
ng help

我收到此错误
ng help
/usr/local/lib/node_modules/@angular/cli/models/config/config.js:15
constructor(_configPath, schema, configJson, fallbacks = []) {
^

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 Module.require (module.js:354:17)
at require (internal/module.js:12:17)
at Object.<anonymous> (/usr/local/lib/node_modules/@angular/cli/models/config.js:2:18)
at Module._compile (module.js:410:26)
at Object.Module._extensions..js (module.js:417:10)

最佳答案

您需要Node 6.x或更高版本

在这里看看:https://github.com/angular/angular-cli/issues/4604

关于angular-cli - Angular CLI更新后出现错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42160699/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com