You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Windows 8.1下Angular CLI安装失败求助:多次尝试仍中途卡顿

Fixing Angular CLI Installation Failures on Windows 8.1 (Node v8.9.4, npm v5.6.0)

Hey there, let's work through this Angular CLI install issue you're hitting. The main culprit here is compatibility—your Node.js and npm versions are pretty old, and modern Angular CLI releases don't support them. Let's break down the fix step by step:

Step 1: Uninstall & Clean Up Residual Files

First, we need to make sure there's no leftover Angular CLI data causing conflicts:

  • Uninstall the global Angular CLI package:
    npm uninstall -g @angular/cli
    
  • Force-clear the npm cache (your older npm version works better with clean --force instead of verify):
    npm cache clean --force
    
  • Manually delete leftover CLI files:
    • Run npm root -g in your command prompt to find your global npm modules folder (usually something like C:\Users\<YourUsername>\AppData\Roaming\npm\node_modules)
    • Delete the @angular folder inside that directory
    • Head to C:\Users\<YourUsername>\AppData\Roaming\npm and delete any files starting with ng (like ng.cmd, ng.ps1)

Step 2: Install a Compatible Angular CLI Version

Node v8.9.4 only supports Angular CLI versions up to v8.x.x. We'll install the last stable release of Angular 8's CLI, which works perfectly with your setup:

npm install -g @angular/cli@8.3.29
  • Pro tip: If you're stuck on download steps due to network issues, use a domestic npm mirror to speed things up:
    npm install -g @angular/cli@8.3.29 --registry=https://registry.npmmirror.com
    

Step 3: Verify the Installation

Once the install finishes, check if it worked by running:

ng --version

You should see the Angular CLI version (8.3.29) along with your Node.js version listed—this means the install was successful!

Quick Notes to Avoid Future Issues

  • Always run your command prompt as Administrator when installing global npm packages on Windows—permission blocks are a common cause of interrupted installs.
  • If you ever plan to upgrade Angular CLI later, you'll need to first upgrade Node.js to a version supported by newer CLI releases (though keep in mind Windows 8.1 has limited support for newer Node versions, so stick to LTS releases that still support Windows 8.1).

内容的提问来源于stack exchange,提问作者khush

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.19 09:09:07