Skip to content

Non-production deployments causing task to fail #28

Open
@general-adhoc

Description

@general-adhoc

Vercel deployments are succeeding to non-prod (production: false), but Azure is reporting task failure:

To deploy to production (mywebsite.com), run `vercel --prod`
##[error]Cannot read properties of undefined (reading 'length')
Finishing: verceldeploymenttask

Only difference between the below YAML examples is the production input.

Successful YAML (deployment and Azure task succeed):

trigger:
  branches:
    include:
      - main
  paths:
    include:
      - my-project

pool:
  vmImage: ubuntu-latest

steps:
- task: vercel-deployment-task@1
  inputs:
    vercelProjectId: 'my-proj-id-here'
    vercelOrgId: 'my-org-id-here'
    vercelToken: '$(VERCEL_TOKEN)'
    vercelCWD: 'my-project'
    production: true
    debug: true

Failing YAML (deployment succeeds, azure task reports failure):

trigger:
  branches:
    include:
      - main
  paths:
    include:
      - my-project

pool:
  vmImage: ubuntu-latest

steps:
- task: vercel-deployment-task@1
  inputs:
    vercelProjectId: 'my-proj-id-here'
    vercelOrgId: 'my-org-id-here'
    vercelToken: '$(VERCEL_TOKEN)'
    vercelCWD: 'my-project'
    production: false
    debug: true

Both of these will successfully deploy to Vercel (one to prod, another to a preview), but the deployment task is being reported as failing in Azure in the latter.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions