0

I am attempting to create a build for a Zapier app. I have several npm steps to install and run various checks within Node. I then do an npm global install for the zapier-platform-cli package and use a command script to run zapier validate. Locally I have this package installed globally and can run this script without issue. However the build will install the package and then when it hits the command task to run zapier validate it states zapier is not a batch file or executable and it cannot execute.

I have tried several different methods to get this to run and have been unsuccessful. The build is running on a private build server and not Visual Studio shared. Has anyone been able to get this command to run properly within an Azure pipeline/build?

Build pipeline:

enter image description here

Error received during build: enter image description here

Brandon Parker
  • 762
  • 7
  • 18

1 Answers1

0

You can try to move the "npm install -g zapier-platform-cli" task to the top as the first step of the job. Then check if the issue can be resolved.

I have tried this and it can work well as expected.

[UPDATE]

You also can try to manually execute the "npm install -g zapier-platform-cli" command on your local machine to install the zapier-platform-cli, then manually execute the zapier command for your project on the local machine to check whether it can work.

  1. If it works locally, try to set up a Self-hosted Windows agent on the local machine to run the pipeline job.

  2. If it also does not work locally, the problem may be laying on the zapier-platform-cli itself.

Bright Ran-MSFT
  • 5,190
  • 1
  • 5
  • 12
  • Thanks for the response. I attempted this solution and received the same error. Order does not appear to matter in terms of how far in advance the global install occurs. – Brandon Parker Jul 13 '22 at 13:00
  • Hi @BrandonParker, I have updated my answer with more suggestions. Please check it. – Bright Ran-MSFT Jul 14 '22 at 05:12
  • Hi @BrandonParker, I have not heard from you for a long time. Just want to say hi and whether you have received my previous reply? As suggested in my previous reply, you can try to manually execute the "npm install -g zapier-platform-cli" command on your local machine to install the zapier-platform-cli, then manually execute the zapier command for your project on the local machine to check whether it can work. – Bright Ran-MSFT Jul 27 '22 at 07:06
  • Hi @BrandonParker I was able to get access to the zapier module by running this script in the YAML. - script: | npm install -g zapier-platform-cli displayName: 'Zapier CLI install' – Derek J. Aug 02 '22 at 22:03