Azure / autorest.powershell

AutoRest PowerShell Generator
MIT License
113 stars 83 forks source link

Autorest hitting ERR_INVALID_ARG_TYPE #1373

Closed mansi-verma-1510 closed 1 month ago

mansi-verma-1510 commented 3 months ago

Before filling a bug

Describe the bug ran this command: E:\GitSwagger\azure-powershell\src\Network\Network.Management.Sdk>autorest --use:@autorest/powershell@4.x It failed with this error:

C:\Users\manverm\.autorest\@autorest_powershell@4.0.704\node_modules\@autorest\powershell\dist\plugins\sdk-generate.js - FAILURE  {"code":"ERR_INVALID_ARG_TYPE"}
fatal   | TypeError [ERRINVALID_ARGTYPE]: The "path" argument must be of type string. Received undefined
fatal   | Process() cancelled due to failure
error   |   Error: Plugin generate reported failure.
error   | Autorest completed with an error. If you think the error message is unclear, or is a bug, please declare an issues at https://github.com/Azure/autorest/issues with the error message you are seeing.

Repo: https://github.com/mansi-verma-1510/azure-powershell/tree/manverm/release-powershell-Microsoft.Network-2024-03-01

**Expected behavior**
I tried reinstalling Node and Autorest but still hitting this same error. What can I do to resolve this?

Node version: v20.16.0
dolauli commented 1 month ago

@mansi-verma-1510 Would you provide me the README.md file that you use for codegen?