CDKTF Init Issue

179 views Asked by At

I am continuously getting this error when cdktf init --template=typescript --local.

[2023-11-04T01:00:18.860] [ERROR] default - Unable to request pre-built provider information: Network error, please check if you're connected to the internet and try again
Connection error
Error: Connection error
    at mNt (/Users/amandugar/.nvm/versions/node/v18.17.1/lib/node_modules/cdktf-cli/bundle/bin/cmds/handlers.js:181:1998)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async yF (/Users/amandugar/.nvm/versions/node/v18.17.1/lib/node_modules/cdktf-cli/bundle/bin/cmds/handlers.js:181:1658)
    at async xjt (/Users/amandugar/.nvm/versions/node/v18.17.1/lib/node_modules/cdktf-cli/bundle/bin/cmds/handlers.js:513:3000)
    at async lje (/Users/amandugar/.nvm/versions/node/v18.17.1/lib/node_modules/cdktf-cli/bundle/bin/cmds/handlers.js:513:1337)
    at async Object.uGe (/Users/amandugar/.nvm/versions/node/v18.17.1/lib/node_modules/cdktf-cli/bundle/bin/cmds/handlers.js:513:30497)
    at async Vg.handleCommand (/Users/amandugar/.nvm/versions/node/v18.17.1/lib/node_modules/cdktf-cli/bundle/bin/cdktf.js:60:16625)
    at async L.handler (/Users/amandugar/.nvm/versions/node/v18.17.1/lib/node_modules/cdktf-cli/bundle/bin/cdktf.js:60:15026)
Collecting Debug Information...
/Users/amandugar/.nvm/versions/node/v18.17.1/lib/node_modules/cdktf-cli/node_modules/yoga-layout-prebuilt/yoga-layout/build/Release/nbind.js:53
        throw ex;
        ^

Error: Connection error
    at mNt (/Users/amandugar/.nvm/versions/node/v18.17.1/lib/node_modules/cdktf-cli/bundle/bin/cmds/handlers.js:181:1998)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async yF (/Users/amandugar/.nvm/versions/node/v18.17.1/lib/node_modules/cdktf-cli/bundle/bin/cmds/handlers.js:181:1658)
    at async xjt (/Users/amandugar/.nvm/versions/node/v18.17.1/lib/node_modules/cdktf-cli/bundle/bin/cmds/handlers.js:513:3000)
    at async lje (/Users/amandugar/.nvm/versions/node/v18.17.1/lib/node_modules/cdktf-cli/bundle/bin/cmds/handlers.js:513:1337)
    at async Object.uGe (/Users/amandugar/.nvm/versions/node/v18.17.1/lib/node_modules/cdktf-cli/bundle/bin/cmds/handlers.js:513:30497)
    at async Vg.handleCommand (/Users/amandugar/.nvm/versions/node/v18.17.1/lib/node_modules/cdktf-cli/bundle/bin/cdktf.js:60:16625)
    at async L.handler (/Users/amandugar/.nvm/versions/node/v18.17.1/lib/node_modules/cdktf-cli/bundle/bin/cdktf.js:60:15026)

I have an good internet connection. Can someone help me with this issue?

1

There are 1 answers

0
Daniel Schmidt On

This seems to be happening as part of the pre-built provider installation. I would start out with cdktf init --template=typescript --local and not select any pre-built providers in the terminal UI. That should get you around the issue and cdktf provider add can help you add the providers after you created your project (or you can add them manually if that does not work).