Azure / Azure/azure-sdk-tools

[JS-Automation] Undefined error reported in the generation tool

Open
#11,093 4 comments 0 reactions 1 assignee Assigned to @MaryGao View on GitHub
Automation Tool Mgmt-EngSys needs-triage
Dominant language
C#
Stars
135
Forks
260
Avg merge
3d 1h
Merged PRs (30d)
143

Description

The following errors were reported in generating JS SDK.

[spec PR](https://github.com/Azure/azure-rest-api-specs/pull/34972)
[pipeline run](https://dev.azure.com/azure-sdk/public/_build/results?buildId=5022510&view=logs&j=83516c17-6666-5250-abde-63983ce72a49&t=00be4b52-4a63-5865-8e02-c61723ad0692&l=1108)

@wanlwanl ,
In addition, could you also add `next steps` to the error message so that users know how they could get help from? Such as, providing a JS related teams channel where JS team would monitor.
 
```
08:53:55.313 cmdout E [automation_generate.sh] [ERROR]: Failed to generate package due to TypeError: Cannot read properties of undefined (reading 'includes')
08:53:55.313 cmdout [automation_generate.sh] at isBetaVersion (file:///opt/hostedtoolcache/node/22.13.1/x64/lib/node_modules/@azure-tools/js-sdk-release-tools/dist/utils/version.js:18:26)
08:53:55.313 cmdout [automation_generate.sh] at getApiVersionTypeFromNpm (file:///opt/hostedtoolcache/node/22.13.1/x64/lib/node_modules/@azure-tools/js-sdk-release-tools/dist/xlc/apiVersion/utils.js:133:20)
08:53:55.313 cmdout [automation_generate.sh] at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
08:53:55.313 cmdout [automation_generate.sh] at async Module.getApiVersionType (file:///opt/hostedtoolcache/node/22.13.1/x64/lib/node_modules/@azure-tools/js-sdk-release-tools/dist/mlc/apiVersion/apiVersionTypeExtractor.js:16:16)
08:53:55.314 cmdout [automation_generate.sh] at async getApiVersionType (file:///opt/hostedtoolcache/node/22.13.1/x64/lib/node_modules/@azure-tools/js-sdk-release-tools/dist/xlc/apiVersion/apiVersionTypeExtractor.js:11:20)
08:53:55.314 cmdout [automation_generate.sh] at async generateChangelogAndBumpVersion (file:///opt/hostedtoolcache/node/22.13.1/x64/lib/node_modules/@azure-tools/js-sdk-release-tools/dist/common/changelog/automaticGenerateChangeLogAndBumpVersion.js:18:28)
08:53:55.314 cmdout [automation_generate.sh] at async generateAzureSDKPackage (file:///opt/hostedtoolcache/node/22.13.1/x64/lib/node_modules/@azure-tools/js-sdk-release-tools/dist/mlc/clientGenerator/modularClientPackageGenerator.js:42:27)
08:53:55.314 cmdout [automation_generate.sh] at async automationGenerateInPipeline (file:///opt/hostedtoolcache/node/22.13.1/x64/lib/node_modules/@azure-tools/js-sdk-release-tools/dist/autoGenerateInPipeline.js:76:39)

```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.