Cdktf get timeout while waiting plugin to start

I’m testing CDKTF with AWS terraform provider.
Last week I created some EC2, with secrets, etc.

Today when I tried to update the code and run the npm run get (cdktf get) I got this error:

[2024-06-07T13:10:50.406] [ERROR] default - ╷
│ Error: Failed to load plugin schemas
│ 
│ Error while loading schemas for plugin components: Failed to obtain
│ provider schema: Could not load the schema for provider
│ registry.terraform.io/hashicorp/aws: failed to instantiate provider
│ "registry.terraform.io/hashicorp/aws" to obtain schema: timeout while
│ waiting for plugin to start..
╵


╷
│ Error: Failed to load plugin schemas
│ 
│ Error while loading schemas for plugin components: Failed to obtain
│ provider schema: Could not load the schema for provider
│ registry.terraform.io/hashicorp/aws: failed to instantiate provider
│ "registry.terraform.io/hashicorp/aws" to obtain schema: timeout while
│ waiting for plugin to start..
╵
Error: non-zero exit code 1
    at ChildProcess.<anonymous> (/Users/testamundo/.nvm/versions/node/v18.19.1/lib/node_modules/cdktf-cli/bundle/bin/cmds/handlers.js:93:251185)
    at Object.onceWrapper (node:events:632:26)
    at ChildProcess.emit (node:events:517:28)
    at ChildProcess.emit (node:domain:489:12)
    at maybeClose (node:internal/child_process:1098:16)
    at Socket.<anonymous> (node:internal/child_process:450:11)
    at Socket.emit (node:events:517:28)
    at Socket.emit (node:domain:489:12)
    at Pipe.<anonymous> (node:net:350:12) {
  stderr: '\x1B[31m\x1B[31m╷\x1B[0m\x1B[0m\n' +
    '\x1B[31m│\x1B[0m \x1B[0m\x1B[1m\x1B[31mError: \x1B[0m\x1B[0m\x1B[1mFailed to load plugin schemas\x1B[0m\n' +
    '\x1B[31m│\x1B[0m \x1B[0m\n' +
    '\x1B[31m│\x1B[0m \x1B[0m\x1B[0mError while loading schemas for plugin components: Failed to obtain\n' +
    '\x1B[31m│\x1B[0m \x1B[0mprovider schema: Could not load the schema for provider\n' +
    '\x1B[31m│\x1B[0m \x1B[0mregistry.terraform.io/hashicorp/aws: failed to instantiate provider\n' +
    '\x1B[31m│\x1B[0m \x1B[0m"registry.terraform.io/hashicorp/aws" to obtain schema: timeout while\n' +
    '\x1B[31m│\x1B[0m \x1B[0mwaiting for plugin to start..\n' +
    '\x1B[31m╵\x1B[0m\x1B[0m\n' +
    '\x1B[0m\x1B[0m\n'
}
⠼ downloading and generating modules and providers...
Error: non-zero exit code 1
make: *** [get] Error 1

This is the definition of the terraform provider:

    new AwsProvider(scope, "aws", {
        region: region,
      });

This is the definition of the cdktf.json

{
  "language": "typescript",
  "app": "npm run --silent compile && node dist/src/main.js",
  "terraformProviders": [
    "aws@ ~> 5"
  ],
  "context": {
    "excludeStackIdFromLogicalIds": "true",
    "allowSepCharsInLogicalIds": "true"
  }
}

I have uninstall nvm, cdktf and terraform and reinstall everything again without luck.
I’m working on a Mac M3 and last week it was updated. I doubt there is any problem with the computer.

Any suggestion?

Could this be related with how the Mac works on Low Power Mode?
All the test I made were with the battery and in Low Power Mode. When I connected it to the power cdktf get started working again.

Still I don’t know if this is related.

@radicaled Any luck on fixing this? I’ve been facing this issue for a while and I’ve pulling my hair out trying to fix this particular issue.