Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

NPX command not running in Azure pipeline

I need your help I was trying to run my cypress test cases which I generally run using command "npx cypress run" so I tried to have the same command in tasks when I created Azure pipeline

after NPM Install

I even tried installing npx via npm task and custom command "npm install nx" and this causing the below issue so can anyone suggest to me how to proceed in this case

"##[warning]Couldn't find a debug log in the cache or working directory

##[error]Error: Npm failed with return code: 1 "

enter image description here

like image 830
ksk Avatar asked Oct 16 '25 23:10

ksk


1 Answers

From the error screenshot, it shows that you are using the Npm Task and running the command: npm npm install nx.

The command is invalid.

To solve this issue, you need to remove the npm in the NPM task -> Command and arguments .

Refer to the following sample:

YAML Pipeline:

- task: Npm@1
  displayName: 'npm custom'
  inputs:
    command: custom
    verbose: false
    customCommand: 'install nx'

Classic Pipeline:

enter image description here

like image 125
Kevin Lu-MSFT Avatar answered Oct 19 '25 02:10

Kevin Lu-MSFT



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!