Error: Unable to find a valid AutoRest core package
- 主要语言
- C#
- 星标
- 290
- 派生
- 50
- 平均合并
- 5 天 13 小时
- 30 天内合并 PR
- 5
描述
1. Installed the module locally on macosx
2. node v10.24.1
```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/anktiwari/.nvm/versions/node/v10.24.1/lib/node_modules/@azure/oad/node_modules/autorest/dist/src_autorest-as-a-service_ts.js:393:23)
at ChildProcess.exithandler (child_process.js:294:12)
at ChildProcess.emit (events.js:198:13)
at maybeClose (internal/child_process.js:982:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
killed: false,
code: 1,
signal: null,
cmd:
'node /Users/anktiwari/.nvm/versions/node/v10.24.1/lib/node_modules/@azure/oad/node_modules/autorest/dist/app.js --v2 --input-file=swagger-c.json --output-artifact=swagger-document.json --output-artifact=swagger-document.map --output-file=old --output-folder=/var/folders/mw/kyxpq1hs3xjg1bybxm_cw1lm0000gq/T',
stdout:
'AutoRest code generation utility [cli version: 3.6.2; node: v10.24.1]\n(C) 2018 Microsoft Corporation.\nhttps://aka.ms/autorest\ninfo | AutoRest core version selected from configuration: ~2.0.4413.\nFailure:\n',
stderr:
'Error: Unable to find a valid AutoRest core package \'@autorest/core\' @ \'~2.0.4413\'.\nError: Unable to find a valid AutoRest core package \'@autorest/core\' @ \'~2.0.4413\'.\n at selectVersion (/Users/anktiwari/.nvm/versions/node/v10.24.1/lib/node_modules/@azure/oad/node_modules/autorest/dist/src_autorest-as-a-service_ts.js:393:23)\n' }
```
I even tried installing autorest/core node module globally which was successful but still the same error
贡献指南
调研方向
Start by reproducing the reported command with Node v10.24.1 and the selected AutoRest core version ~2.0.4413. Inspect autorest/dist/src_autorest-as-a-service_ts.js at selectVersion and how the @autorest/core package is resolved. Done means the command can locate a valid core package and proceed without this error.
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- node.js
- 领域
- cli
- Issue 类型
- 缺陷
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 需要澄清
- 新手友好度
- 25/100