I am trying to deploy to vercel using azure devops extension for vercel , I am using Classic editor for creating pipeline.
While passing the Vercel Current Working Directory value the pipelline is getting failed I am passing the subdirectory path of my azure repos
vercelCWD: ‘src/nextjs/demo’
I am getting the error : 024-08-22T11:28:20.1367025Z ##[error]Unable to locate executable file: ‘npm’. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.
Can anyone guide me what is going wrong
Hi, and welcome to the Vercel Community @chopkarmanoj!
I’m not too familiar with Azure DevOps, but happy to try and help out here. I also invite another community member, @msigvartsen in the discussion in case they had an idea! They just asked a related question (Set up staging environment in Vercel using azure devops repo)
[error]Unable to locate executable file: 'npm'. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.
The error that you’re seeing suggests that the pipeline is unable to find the npm
executable. This could be due to the working directory you specified (src/nextjs/demo
) might not be correct.
Could you make sure that the path you’re specifying in vercelCWD
is correct relative to the root of your repository? If your package.json
file is located in src/nextjs/demo
, then your current setting should be right.
I’ll also leave some relevant documentation below: