Runtime Error - something to do with Autorest
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 25/100
- Issue 类型
- 缺陷
- 描述清晰度
- 需要澄清
- 活跃度
- 停滞
- 技术栈
- node.js
- 领域
- cli
调研方向
首先,使用报告中的 Node 和 oad 版本重现 oad compare derefd.json derefd2.json,然后检查 node_modules/autorest/dist/app.js 中的 AutoRest 入口点以及 @autorest/core 的版本选择。完成的标准是该命令能够找到所需的 core 包,并在没有报告的运行时错误的情况下完成比较。
由索引模型根据 Issue 内容生成。
描述
I installed it like so:
npm install -g @azure/oad
My env:
OS: MacOS Monterey 12.4
oad ver: 0.9.7
$ npm --version
6.14.16
$ node --version
v12.22.12
$ nvm --version
0.39.1
Then, tried to run the command:
oad compare derefd.json derefd2.json
Got:
Error: Command failed: node /Users/ananrao/.nvm/versions/node/v12.22.12/lib/node_modules/@azure/oad/node_modules/autorest/dist/app.js --v2 --input-file=derefd.json --output-artifact=swagger-document.json --output-artifact=swagger-document.map --output-file=old --output-folder=/var/folders/_v/yt6hqgc91zs8r1zzwr8g5tb80000gq/T
Error: Unable to find a valid AutoRest core package '@autorest/core' @ '~2.0.4413'.
Error: Unable to find a valid AutoRest core package '@autorest/core' @ '~2.0.4413'.
at selectVersion (/Users/ananrao/.nvm/versions/node/v12.22.12/lib/node_modules/@azure/oad/node_modules/autorest/dist/src_autorest-as-a-service_ts.js:393:23)
at ChildProcess.exithandler (child_process.js:308:12)
at ChildProcess.emit (events.js:314:20)
at maybeClose (internal/child_process.js:1022:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:287:5) {
killed: false,
code: 1,
signal: null,
cmd: 'node /Users/ananrao/.nvm/versions/node/v12.22.12/lib/node_modules/@azure/oad/node_modules/autorest/dist/app.js --v2 --input-file=derefd.json --output-artifact=swagger-document.json --output-artifact=swagger-document.map --output-file=old --output-folder=/var/folders/_v/yt6hqgc91zs8r1zzwr8g5tb80000gq/T',
stdout: 'AutoRest code generation utility [cli version: 3.6.2; node: v12.22.12]\n' +
'(C) 2018 Microsoft Corporation.\n' +
'https://aka.ms/autorest\n' +
'info | AutoRest core version selected from configuration: ~2.0.4413.\n' +
'Failure:\n',
stderr: "Error: Unable to find a valid AutoRest core package '@autorest/core' @ '~2.0.4413'.\n" +
"Error: Unable to find a valid AutoRest core package '@autorest/core' @ '~2.0.4413'.\n" +
' at selectVersion (/Users/ananrao/.nvm/versions/node/v12.22.12/lib/node_modules/@azure/oad/node_modules/autorest/dist/src_autorest-as-a-service_ts.js:393:23)\n'
}
- 主要语言
- C#
- 星标
- 290
- 派生
- 50
- 平均合并
- 2 天 21 小时
- 30 天内合并 PR
- 10
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
Azure/openapi-diff 的其他 Issue
-
Azure/openapi-diff#482 · 已指派 1 人 ·
-
Azure/openapi-diff#479 · 2 条评论 · 已指派 1 人 ·
-
Azure/openapi-diff#456 · 已指派 1 人 ·
-
难度 4/5 3-5 天 新手友好度 35/100
Azure/openapi-diff#445 ·
-
Azure/openapi-diff#371 · 7 条评论 · 已指派 1 人 ·
查看 Azure/openapi-diff 的全部 Issue
相似的 Issue
-
:watch: Not Triaged dotnet-fsharp/svc
难度 1/5 1 小时以内 新手友好度 90/100
-
Client customer-reported needs-team-attention question Service Attention WebPubSub
难度 2/5 1-3 小时 新手友好度 76/100
Azure/azure-sdk-for-net#63292 · 3 条评论 · 1 个 reaction ·
-
Issue-Enhancement Needs-Triage
难度 1/5 1 小时以内 新手友好度 86/100
PowerShell/PowerShell#28061 · 2 个 reaction ·
-
dependencies needs-team-triage server-Azure.Mcp
难度 2/5 1-3 小时 新手友好度 72/100
-
aspnet-core/svc aspnetcore-signalr/subsvc doc-enhancement Pri2 SignalR
难度 1/5 1 小时以内 新手友好度 88/100
dotnet/AspNetCore.Docs#37729 ·