代码之家  ›  专栏  ›  技术社区  ›  e2rabi

angular cli ng命令给出“意外令牌=”

  •  0
  • e2rabi  · 技术社区  · 8 年前

    npm公司 使用此命令行:

    npm install -g @angular/cli
    

    安装成功,但当我尝试使用 commande然后我出现了这个错误:

    root@errabi-Lenovo-G560:/home/errabi/Desktop# ng help
    /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)
        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:3:18)
        at Module._compile (module.js:410:26)
        at Object.Module._extensions..js (module.js:417:10)
    

    对这个问题有什么想法吗提前谢谢

    1 回复  |  直到 8 年前
        1
  •  1
  •   Anurag Singh Bisht    8 年前

    正如您所提到的,您有节点v 4.2.6

    先决条件

    CLI和生成的项目都具有需要节点的依赖项

    推荐文章