JSII error using cdktf get command - CLI

I’m trying to install terraform-ibm-modules/vpc/ibm and get this error:

bamazeen@Brads-MacBook-Pro cdktf-python-1 % cdktf get
NOTE: Temp directory retained due to an error: /var/folders/wl/rsxvk3kd74lgntg9xwrjfc500000gn/T/temp-htmr1G
Error: jsii compilation failed with non-zero exit code: 1
| [2022-03-03T15:54:25.224] [ERROR] jsii/compiler - Compilation errors prevented the JSII assembly from being created
| warning JSII6: A “peerDependency” on “constructs” at “10.0.76” means you should take a “devDependency” on “constructs” at “10.0.76” (found “undefined”)"
| warning JSII6: A “peerDependency” on “cdktf” at “0.9.4” means you should take a “devDependency” on “cdktf” at “0.9.4” (found “undefined”)"
| warning JSII3: There is no “README.md” file. It is required in order to generate valid PyPI (Python) packages.
| modules/terraform-ibm-modules/ibm/vpc.ts:9:52 - error TS6133: ‘options’ is declared but its value is never read.
| 9 public constructor(scope: Construct, id: string, options: VpcOptions = {}) {
| ~~~~~~~
±---------------------------------------------------------------------------------
| Command: /usr/local/lib/node_modules/cdktf-cli/node_modules/jsii/bin/jsii --silence-warnings reserved-word
| Workdir: /var/folders/wl/rsxvk3kd74lgntg9xwrjfc500000gn/T/temp-htmr1G
±---------------------------------------------------------------------------------
at y (/usr/local/lib/node_modules/cdktf-cli/bundle/bin/cmds/handlers.js:50:1480)
at ChildProcess. (/usr/local/lib/node_modules/cdktf-cli/bundle/bin/cmds/handlers.js:53:112)
at Object.onceWrapper (node:events:510:26)
at ChildProcess.emit (node:events:390:28)
at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12)
⠋ downloading and generating modules and providers…
jsii compilation failed with non-zero exit code: 1
| [2022-03-03T15:54:25.224] [ERROR] jsii/compiler - Compilation errors prevented the JSII assembly from being created
| warning JSII6: A “peerDependency” on “constructs” at “10.0.76” means you should take a “devDependency” on “constructs” at “10.0.76” (found “undefined”)"
| warning JSII6: A “peerDependency” on “cdktf” at “0.9.4” means you should take a “devDependency” on “cdktf” at “0.9.4” (found “undefined”)"
| warning JSII3: There is no “README.md” file. It is required in order to generate valid PyPI (Python) packages.
| modules/terraform-ibm-modules/ibm/vpc.ts:9:52 - error TS6133: ‘options’ is declared but its value is never read.
| 9 public constructor(scope: Construct, id: string, options: VpcOptions = {}) {
| ~~~~~~~
±---------------------------------------------------------------------------------
| Command: /usr/local/lib/node_modules/cdktf-cli/node_modules/jsii/bin/jsii --silence-warnings reserved-word
| Workdir: /var/folders/wl/rsxvk3kd74lgntg9xwrjfc500000gn/T/temp-htmr1G
±---------------------------------------------------------------------------------

Any thoughts? Thanks! -Brad

Looks like that module is just a collection of submodules. Submodules aren’t automatically generated and need to be manually specified. An example from that module would be terraform-ibm-modules/vpc/ibm//modules/vpc.

1 Like

Thank you, that did the trick. Very appreciated.