ng: command not found

前端 未结 11 1482
伪装坚强ぢ
伪装坚强ぢ 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 01:05

    Try this:

    node_modules/.bin/ng build
    

    Or better, add a blank "ng": "ng"line into your scripts key in package.json and run this:

    `npm run ng build`
    

    You could also add this to your path:

    export PATH=$PATH:./node_modules/bin
    

    Which would let you run any binary in any npm project you might have.

提交回复
热议问题