代码之家  ›  专栏  ›  技术社区  ›  Apple Orange

如何为节点安装angular cli

  •  -2
  • Apple Orange  · 技术社区  · 6 年前

    我正在尝试安装angular cli,但我正在理解下面的消息。如何为nodejs v6.x.x安装特定的angular cli版本。哪个angular cli版本适合nodsjs v6.x.x?

    You are running version v6.x.x of node.js, which is not supported by angular CLI v6. The official Node.js version that is supported is 8.x and greater.
    
    3 回复  |  直到 6 年前
        1
  •  11
  •   Tim Martens    6 年前

    我认为最后一个版本与 node 6.9.x @angular/cli@6.0.8 支票 this 对于所有版本

    npm uninstall -g @angular/cli
    npm cache clean --force
    npm install -g @angular/cli@6.0.8
    
        2
  •  1
  •   kedenk    6 年前

    你必须调整 angular-cli 在package.json文件中。应该有一个 角cli . 请看下图。低于 devDependencies 你可以看到 @angular/cli 与版本。更改此版本并再次调用 npm install .

    enter image description here

    json包位于angular项目的根目录中。它是自动生成的 npm init .

        3
  •  -2
  •   Prabhat Maurya    6 年前

    如果要在系统上安装最新版本的Node,可以升级或卸载当前的Node版本,然后在正式节点站点下下载并安装- https://nodejs.org/en/download/

    要检查当前安装的节点版本,请使用

    1. Window key+ r -> opens run window
    2. Type cmd press enter.
    3. Type node -v to check the currently installed node version.
    4. Type npm -v to check currently installed npm version.
    5. Your primary problem was to install angular/cli
    so  use command npm install -g @angular/cli this will install angular/cli globally.