我正在尝试使用 MsBuilds 构建我的角度解决方案。
以下是我的代码片段
> <Exec Command="npm install" WorkingDirectory="$(SolutionRoot)\Dev\AngularUI" />
> <Exec Command="npm install -g @angular/cli" WorkingDirectory="$(SolutionRoot)\Dev\AngularUI" />
> <Exec Command="ng build --prod" WorkingDirectory="$(SolutionRoot)\Dev\AngularUI" />
虽然npm i
命令工作正常,但我收到命令错误'ng' is not recognized as an internal or external command
。ng build --prod
我尝试从 cmd 运行相同的命令,并且在相同的构建帐户中也可以正常工作。