2
votes

I'm trying to get my build pipeline up and running for an angular-cli app. As far as I can understand I need to install angular-cli with the globaly to be able to test the app.

I've been trying to follow this guide https://blogs.msdn.microsoft.com/premier_developer/2017/05/17/integrating-angular-4-unit-tests-with-visual-studio-team-services-vsts/

But when I run the "Install Angular-CLI" step, I get the following error in VSTS

2017-07-23T19:10:50.7544696Z ##[section]Starting: Install Angular CLI 2017-07-23T19:10:50.7674698Z ============================================================================== 2017-07-23T19:10:50.7674698Z Task : npm 2017-07-23T19:10:50.7674698Z Description : Install and publish npm packages, or run an npm command. Supports npmjs.com and authenticated registries like Package Management. 2017-07-23T19:10:50.7674698Z Version : 1.0.3 2017-07-23T19:10:50.7674698Z Author : Microsoft Corporation 2017-07-23T19:10:50.7674698Z Help : More Information 2017-07-23T19:10:50.7674698Z ============================================================================== 2017-07-23T19:10:51.5557774Z ##[error]TypeError: Cannot read property 'trim' of null 2017-07-23T19:10:51.5587778Z ##[section]Finishing: Install Angular CLI

I've entered everything as shown in the link. Is it a bug somewhere, or anyone know what I am doing wrong?

1
Do you know what version of node/npm is installed on the VSTS server? Any node version prior to 6.9 could be problematic.R. Richards

1 Answers

7
votes

You specified the command in the input box of Working folder with package.json, which is incorrect.

With 1.* version of NPM install task, you can select custom in Command input box, then specify command in the input box of Command and arguments.

enter image description here