0

I try to run cypress tests in azure devops. When try to use npm task i receive error like:

npm ERR! code ENOENT
npm ERR! syscall spawn git
npm ERR! path git
npm ERR! errno ENOENT

My question is what does it mean? Where should i search causes? I receive these error everytime I use npm task like below. Git is installed in device. Paths are added.

      - task: Npm@1
        displayName: "npm install"
        inputs:
          command: 'install'                  
          workingDir: '$(System.SomeArtifact)/drop/SomeDirWithPackageJson'
      - task: Npm@1
        displayName: "run cy:run"
        inputs:
          command: 'custom'
          workingDir: '$(System.SomeArtifact)/drop/SomeDirWithPackageJson'
          customCommand: 'run cy:run'
SixtySeven
  • 119
  • 2
  • 10

1 Answers1

0
npm ERR! syscall spawn git

An error message like this usually means that git isn't configured correctly or isn't installed. Make sure git is added to your PATH. Here's a ticket that should help you get things setup.

If git is installed, type this command in cmd 'git --version' If it returns any version you are good else.

In addition, you can check whether the installed git is only accessible from Git Bash, if so, you need to reinstall with the second option.

enter image description here

Here are some tickets(case1, case2) with the same error you can refer to.

Hugh Lin
  • 17,829
  • 2
  • 21
  • 25
  • I installed git in my device already. That's why i don't get why these err still occurs. Do I need install git in pipeline too? – SixtySeven Nov 17 '20 at 15:06