microsoft / azure-pipelines-tasks

Tasks for Azure Pipelines
https://aka.ms/tfbuild
MIT License
3.47k stars 2.6k forks source link

npm test failing for jasmine test cases #8925

Closed montyshashi closed 5 years ago

montyshashi commented 5 years ago

Environment

Issue Description

I am using jasmine test cases for the node application, when I am running "npm test" from the azure pipeline(using npm custom task), getting sh: 1: jasmine: Permission denied

Error logs

2018-11-28T00:09:38.3034992Z ##[section]Starting: npm custom 2018-11-28T00:09:38.3038797Z ============================================================================== 2018-11-28T00:09:38.3038902Z Task : npm 2018-11-28T00:09:38.3038939Z Description : Install and publish npm packages, or run an npm command. Supports npmjs.com and authenticated registries like Package Management. 2018-11-28T00:09:38.3038976Z Version : 1.0.30 2018-11-28T00:09:38.3039054Z Author : Microsoft Corporation 2018-11-28T00:09:38.3039092Z Help : More Information 2018-11-28T00:09:38.3039128Z ============================================================================== 2018-11-28T00:09:38.5705828Z SYSTEMVSSCONNECTION exists true 2018-11-28T00:09:38.6903312Z SYSTEMVSSCONNECTION exists true 2018-11-28T00:09:38.9021607Z [command]/usr/local/bin/npm --version 2018-11-28T00:09:39.0743303Z 6.4.1 2018-11-28T00:09:40.7989668Z sh: 1: jasmine: Permission denied 2018-11-28T00:09:40.7989780Z npm ERR! Test failed. See above for more details. 2018-11-28T00:09:40.7994612Z [command]/usr/local/bin/npm config list 2018-11-28T00:09:40.7994679Z ; cli configs 2018-11-28T00:09:40.7994880Z metrics-registry = "https://registry.npmjs.org/" 2018-11-28T00:09:40.7994913Z scope = "" 2018-11-28T00:09:40.7995089Z user-agent = "npm/6.4.1 node/v8.12.0 linux x64" 2018-11-28T00:09:40.7995112Z 2018-11-28T00:09:40.7995159Z ; environment configs 2018-11-28T00:09:40.7995322Z cache = "/home/vsts/work\_temp\npm-cache" 2018-11-28T00:09:40.7995355Z userconfig = "/home/vsts/work/1/npm/44.npmrc" 2018-11-28T00:09:40.7995375Z 2018-11-28T00:09:40.7995666Z ; node bin location = /usr/local/bin/node 2018-11-28T00:09:40.7995698Z ; cwd = /home/vsts/work/1/s 2018-11-28T00:09:40.7995728Z ; HOME = /home/vsts 2018-11-28T00:09:40.7995938Z ; "npm config ls -l" to show all defaults. 2018-11-28T00:09:40.7995961Z 2018-11-28T00:09:40.7996092Z [command]/usr/local/bin/npm test 2018-11-28T00:09:40.7996131Z 2018-11-28T00:09:40.7996316Z > martech-connector@0.1.0 test /home/vsts/work/1/s 2018-11-28T00:09:40.7996359Z > jasmine 2018-11-28T00:09:40.7996378Z 2018-11-28T00:09:42.0684811Z ##[warning]Couldn't find a debug log in the cache or working directory 2018-11-28T00:09:42.0695725Z ##[error]Error: Npm failed with return code: 1 2018-11-28T00:09:42.0710967Z ##[section]Finishing: npm custom

bryanmacfarlane commented 5 years ago

looks specific to jasmine tests

prawalagarwal commented 5 years ago

@montyshashi Can you please attach your complete build logs from a run with system.debug set to true in build variables.

prawalagarwal commented 5 years ago

Closing the thread. Please reopen if you are still facing issues here.

ayswaryabg commented 3 years ago

Is this issue resolved?