ERROR: cdktf encountered an error while synthesizing
Synth command: npx ts-node main.ts
Error: non-zero exit code 1
Command output on stderr:
/home/runner/.npm/_npx/1bf7c3c15bf47d04/node_modules/ts-node/src/index.ts:859
return new TSError(diagnosticText, diagnosticCodes, diagnostics);
^
TSError: ⨯ Unable to compile TypeScript:
main.ts(1,24): error TS2307: Cannot find module 'cdktf' or its corresponding type declarations.
main.ts(2,29): error TS2307: Cannot find module '@cdktf/provider-cloudflare' or its corresponding type declarations.
main.ts(3,23): error TS2307: Cannot find module 'path' or its corresponding type declarations.
main.ts(4,25): error TS2307: Cannot find module '@cdktf/provider-random' or its corresponding type declarations.
main.ts(9,27): error TS2307: Cannot find module 'constructs' or its corresponding type declarations.
main.ts(10,70): error TS2307: Cannot find module 'cdktf' or its corresponding type declarations.
main.ts(13,1): error TS2580: Cannot find name 'require'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`.
main.ts(127,47): error TS2580: Cannot find name 'require'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`.
main.ts(128,7): error TS2304: Cannot find name '__dirname'.
at createTSError (/home/runner/.npm/_npx/1bf7c3c15bf47d04/node_modules/ts-node/src/index.ts:859:12)
at reportTSError (/home/runner/.npm/_npx/1bf7c3c15bf47d04/node_modules/ts-node/src/index.ts:863:19)
at getOutput (/home/runner/.npm/_npx/1bf7c3c15bf47d04/node_modules/ts-node/src/index.ts:1077:36)
at Object.compile (/home/runner/.npm/_npx/1bf7c3c15bf47d04/node_modules/ts-node/src/index.ts:1433:41)
at Module.m._compile (/home/runner/.npm/_npx/1bf7c3c15bf47d04/node_modules/ts-node/src/index.ts:1617:30)
at Module._extensions..js (node:internal/modules/cjs/loader:1422:10)
at Object.require.extensions.<computed> [as .ts] (/home/runner/.npm/_npx/1bf7c3c15bf47d04/node_modules/ts-node/src/index.ts:1621:12)
at Module.load (node:internal/modules/cjs/loader:1203:32)
at Function.Module._load (node:internal/modules/cjs/loader:1019:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:128:12) {
diagnosticCodes: [
2307, 2307, 2307,
2307, 2307, 2307,
2580, 2580, 2304
]
}