Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue executing PublishAzureDevOpsExtension using VsTeam #460

Open
learner-1111 opened this issue Aug 6, 2024 · 2 comments
Open

Issue executing PublishAzureDevOpsExtension using VsTeam #460

learner-1111 opened this issue Aug 6, 2024 · 2 comments

Comments

@learner-1111
Copy link

I have the following task:

  • task: PublishAzureDevOpsExtension@4
    displayName: 'Publishment}} Extension'
    inputs:
    connectedServiceName: 'someServiceName'
    fileType: vsix
    connectTo: VsTeam
    vsixFile: $(Agent.BuildDirectory)/drop/dev/*.vsix

We are trying to publish a react js based custom extension to a private marketplace. However, we keep getting the following error message:

"error: TypeError: Cannot read properties of null (reading 'versions') "

I am trying to google the error message and most results are npm and react related build. However we have done the built successfully and produce the vsix file in the previous stage before executing the task above using the following azure devops steps:

- script: npm run build-and-package
  displayName: 'Building and Packing extension'

- task: CopyFiles@2
  displayName: Copy vsix files
  inputs:
    sourceFolder: $(Build.SourcesDirectory)/out
    contents: |
      **/*.vsix
    targetFolder: '$(Build.ArtifactStagingDirectory)'

Any clues the source of the issue for the "error: TypeError: Cannot read properties of null (reading 'versions') " error message? thanks!

@vmapetr
Copy link

vmapetr commented Oct 1, 2024

Hi @learner-1111 thanks for reporting!
We are working on more prioritized issues at the moment, but will get back to this one soon.

@JamieMagee
Copy link
Member

This happens on first publish, because there are no versions returned from the API. However, the CLI expects versions to always be populated.

const versions = ext.versions;

A workaround is to use the --no-wait-validation flag.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants