ng: command not found

前端 未结 11 1485
伪装坚强ぢ
伪装坚强ぢ 2020-12-21 00:22

I am trying to run ng build in my project folder, but I get the following response:

bash: ng: command not found

Wha

11条回答
  •  感情败类
    2020-12-21 00:50

    Based on your comments to other answers: This npm issue might be related to your problem, your npm installation might be outdated.

    First of check whether you use a recent version of node. Then update npm with npm i -g npm as the issue suggests (near bottom). Then if ng is still not found follow the update instructions of @angular/cli:

    npm uninstall -g @angular/cli
    npm cache verify
    # if npm version is < 5 then use 'npm cache clean'
    npm install -g @angular/cli@latest
    

提交回复
热议问题