CDKTF 初始化问题

问题描述 投票:0回答:2

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)

我的互联网连接良好。有人可以帮我解决这个问题吗?

typescript terraform terraform-cdk
2个回答
0
投票

这似乎是作为预构建的提供程序安装的一部分发生的。我将从

cdktf init --template=typescript --local
开始,而不是在终端 UI 中选择任何预构建的提供程序。这应该可以帮助您解决这个问题,并且
cdktf provider add
可以帮助您在创建项目后添加提供程序(如果不起作用,您也可以手动添加它们)。


0
投票

您解决这个问题了吗?请告诉我,我也遇到了同样的问题。

© www.soinside.com 2019 - 2024. All rights reserved.