Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

685
Visualizações
AWS CDK Init for an existing project

I'm trying to initialize the AWS CDK on a new website I just created via Visual Studio.

But when I run the init commmand I get the error: cdk init cannot be run in a non-empty directory

❯ cdk init app --language=csharp
`cdk init` cannot be run in a non-empty directory!

The CDK Workshop uses the example of starting from scrach (in an empty directory).

Is it possible to initialize the CDK inside an existing solution/project?

over 4 years ago · Santiago Trujillo
2 Respostas
Responde à pergunta

0

cdk init creats a basic structure and skelton such as app and sub directory in which it create a stack.

You can run it in a empty directory and then back up the files you will override, then copy an actual cdk application/project (such as workshop one) into it.

I use this way to create another CDK project when I re-use the existing one.

over 4 years ago · Santiago Trujillo Relatório

0

At the moment there is no way to execute cdk init in a non-empty directory. This is a safety net against cluttering a directory with the CDK files where they might not be wanted.

That said, there is no practical reason a command flag to override this protection couldnt be added. You could consider putting in a feature-request on the repo.

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda