Skip to content

Failed: New-DevTSPModule when generating new code for PostgreSQL Flexible Server #1541

@nasc17

Description

@nasc17

Following instructions defined here: Azure PowerShell development using TypeSpec code generation

Failed trying to generate module:
New-DevTSPModule -TSPLocation "https://github.com/Azure/azure-rest-api-specs/blob/be31c7768b25795ee6aadd24783100254499c845/specification/postgresql/DBforPostgreSQL.Management/tspconfig.yaml" -AzPSConfig "C:\Users\nasc\azure-powershell\src\PostgreSQLFlexibleServer\PostgreSQLFlexibleServer.Autorest\tspconfig.yaml"

× Running @azure-tools/typespec-powershell...
Emitter "@azure-tools/typespec-powershell" crashed! This is a bug.
Please file an issue at https://github.com/Azure/autorest.powershell/issues
Error: Unknown Model. Fatal.
    at SchemaDefinitionResolver.resolveTypeDeclaration (C:\Users\nasc\azure-powershell\src\PostgreSQLFlexibleServer\PostgreSQLFlexibleServer.Autorest\TempTypeSpecFiles\specification\postgresql\DBforPostgreSQL.Management\node_modules\@autorest\powershell\llcsharp\schema\schema-resolver.ts:149:11)
    at ModelsNamespace.NewResolveTypeDeclaration (C:\Users\nasc\azure-powershell\src\PostgreSQLFlexibleServer\PostgreSQLFlexibleServer.Autorest\TempTypeSpecFiles\specification\postgresql\DBforPostgreSQL.Management\node_modules\@autorest\powershell\llcsharp\model\namespace.ts:92:33)
    at ModelInterface.init (C:\Users\nasc\azure-powershell\src\PostgreSQLFlexibleServer\PostgreSQLFlexibleServer.Autorest\TempTypeSpecFiles\specification\postgresql\DBforPostgreSQL.Management\node_modules\@autorest\powershell\llcsharp\model\interface.ts:229:58)
    at new ModelClass (C:\Users\nasc\azure-powershell\src\PostgreSQLFlexibleServer\PostgreSQLFlexibleServer.Autorest\TempTypeSpecFiles\specification\postgresql\DBforPostgreSQL.Management\node_modules\@autorest\powershell\llcsharp\model\model-class.ts:136:65)
    at ModelsNamespace.NewResolveTypeDeclaration (C:\Users\nasc\azure-powershell\src\PostgreSQLFlexibleServer\PostgreSQLFlexibleServer.Autorest\TempTypeSpecFiles\specification\postgresql\DBforPostgreSQL.Management\node_modules\@autorest\powershell\llcsharp\model\namespace.ts:105:67)
    at new ModelsNamespace (C:\Users\nasc\azure-powershell\src\PostgreSQLFlexibleServer\PostgreSQLFlexibleServer.Autorest\TempTypeSpecFiles\specification\postgresql\DBforPostgreSQL.Management\node_modules\@autorest\powershell\llcsharp\model\namespace.ts:54:14)
    at Project.init (C:\Users\nasc\azure-powershell\src\PostgreSQLFlexibleServer\PostgreSQLFlexibleServer.Autorest\TempTypeSpecFiles\specification\postgresql\DBforPostgreSQL.Management\node_modules\@autorest\powershell\llcsharp\project.ts:104:28)
    at llcsharpV2 (C:\Users\nasc\azure-powershell\src\PostgreSQLFlexibleServer\PostgreSQLFlexibleServer.Autorest\TempTypeSpecFiles\specification\postgresql\DBforPostgreSQL.Management\node_modules\@autorest\powershell\plugins\llcsharp-v2.ts:19:21)
    at generatePwshModule (C:\Users\nasc\azure-powershell\src\PostgreSQLFlexibleServer\PostgreSQLFlexibleServer.Autorest\TempTypeSpecFiles\specification\postgresql\DBforPostgreSQL.Management\node_modules\@autorest\powershell\utils\tsp-generator.ts:67:3)
    at generatePwshModel (file:///C:/Users/nasc/azure-powershell/src/PostgreSQLFlexibleServer/PostgreSQLFlexibleServer.Autorest/TempTypeSpecFiles/specification/postgresql/DBforPostgreSQL.Management/node_modules/@azure-tools/typespec-powershell/src/emitter.ts:73:7)
--------------------------------------------------
Library Version                0.0.376
TypeSpec Compiler Version      1.7.0
--------------------------------------------------
New-DevTSPModule: Failed to emit from TSP config [C:\Users\nasc\azure-powershell\src\PostgreSQLFlexibleServer\PostgreSQLFlexibleServer.Autorest\TempTypeSpecFiles\specification\postgresql\DBforPostgreSQL.Management\tspconfig.yaml]: One or more errors occurred. (Command 'node node_modules\@typespec\compiler\cmd\tsp compile ./ --emit @azure-tools/typespec-powershell --output-dir C:\Users\nasc\azure-powershell\src\PostgreSQLFlexibleServer\PostgreSQLFlexibleServer.Autorest' failed with exit code 1)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions