Angular - ng: command not found Ask Question

Angular - ng: command not found Ask Question

I'm trying to learn Angular and my knowledge in terminal is beginner. After I installed Angular and then type ng new my-project. I get the response ng: command not found. I've seen other posts that had this problem and I've uninstalled and reinstalled npm and ng.

The last step I took was npm install -g @angular/cli@latest then ng new my-project.

Then I get ng: command not found.

ベストアンサー1

Guess You are running on Windows (To make @jowey's answer more straightforward).

  • Install Angular normally from your bash $ npm install -g @angular/cli@latest Next is to rearrange the PATHS to
  • NPM
  • Nodejs
  • 角度CLI

システム環境変数では、下図のように配置されます。

ここに画像の説明を入力してください

おすすめ記事