【问题标题】:TFX-CLI fails on "tfx extension create"TFX-CLI 在“创建 tfx 扩展”时失败
【发布时间】:2020-10-29 15:33:37
【问题描述】:

背景:使用 AzureDevops Services 作为 Ci/CD,需要创建自定义 Service Endpoint,遵循 these 文档.
之后是 this 发布,但失败了。

目标:创建自定义服务端点。

问题:在运行“tfx extension create”命令时,出现此错误(似乎没有调试工作):

C:\Users\USER\Desktop\extension>tfx extension create --trace-level debug
(node:19816) Warning: Accessing non-existent property 'padLevels' of module exports inside circular dependency
(Use `node --trace-warnings ...` to show where the warning was created)
TFS Cross Platform Command Line Interface v0.8.3
Copyright Microsoft Corporation
2020-10-29T15:52:51.089Z : cache.getItem
2020-10-29T15:52:51.098Z : merger.merge
2020-10-29T15:52:51.099Z : merger.gatherManifests
2020-10-29T15:52:51.106Z : Merging 1 manifest from the following paths:
2020-10-29T15:52:51.107Z : vss-extension.json
2020-10-29T15:52:51.112Z : Path 'C:\Users\USER\Desktop\extension\node_modules\vss-web-extension-sdk\lib` is a directory. Adding all contained files (recursive).
2020-10-29T15:52:51.115Z : -- VSS.SDK.js
2020-10-29T15:52:51.117Z : -- VSS.SDK.min.js
2020-10-29T15:52:51.120Z : Path 'C:\Users\USER\Desktop\extension\BuildTaskFolder` is a directory. Adding all contained files (recursive).
2020-10-29T15:52:51.121Z : -- task.json
2020-10-29T15:52:51.130Z : Generating [Content_Types].xml
2020-10-29T15:52:51.137Z : Error: There were errors with your extension. Address the following and re-run the tool.
2020-10-29T15:52:51.137Z : One or more 'categories' must be provided.
2020-10-29T15:52:51.137Z :     at C:\Users\USER\AppData\Roaming\npm\node_modules\tfx-cli\_build\exec\extension\_lib\merger.js:212:39
error: Error: There were errors with your extension. Address the following and re-run the tool.
error: One or more 'categories' must be provided.

非常感谢您的建议。

【问题讨论】:

    标签: azure-devops azure-devops-extensions tfx


    【解决方案1】:

    根据您的错误消息:错误:必须提供一个或多个“类别”。您需要在 vss-extension.json 文件中添加类别。该文件包含必需的属性。 Categories 是一个字符串数组,表示您的扩展所属的类别。必须至少提供一个类别,并且您可以包含的类别数量没有限制。 例如:

    "categories": [
            "Azure Boards"
    ],
    

    您可以在文档中找到有关required attributes 的更多信息。

    【讨论】:

    • 非常感谢,这是一场斗争。教程中没有对此进行解释,MS 在他们的文档中有一步一步的说明。如果他们添加它以防止进一步的错误会很好。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-02-29
    • 1970-01-01
    • 2021-07-01
    • 1970-01-01
    相关资源
    最近更新 更多