I am getting the following error. Any hints on what would be causing it?
2023-08-15T00:21:32.020] [ERROR] default - Error: Cannot find module '/usr/local/home/user/code/terraform-cdk/node_modules/cdktf/lib/index.js'. Please verify that the package.json has a valid "main" entry
at tryPackage (node:internal/modules/cjs/loader:409:19)
at Function.Module._findPath (node:internal/modules/cjs/loader:651:18)
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:1025:27)
at Function.Module._resolveFilename.sharedData.moduleResolveFilenameHook.installedValue [as _resolveFilename] (/usr/local/home/user/code/terraform-cdk/node_modules/@cspotcode/source-map-support/source-map-support.js:811:30)
at Function.Module._load (node:internal/modules/cjs/loader:885:27)
at Module.require (node:internal/modules/cjs/loader:1105:19)
at require (node:internal/modules/cjs/helpers:103:18)
at Object.<anonymous> (/usr/local/home/user/code/terraform-cdk/examples/typescript/main.ts:4:1)
at Module._compile (node:internal/modules/cjs/loader:1218:14)
at Module.m._compile (/usr/local/home/user/code/terraform-cdk/node_modules/ts-node/src/index.ts:1618:23) {
code: 'MODULE_NOT_FOUND',
path: '/usr/local/home/user/code/terraform-cdk/node_modules/cdktf/package.json',
requestPath: 'cdktf'
ERROR: cdktf encountered an error while synthesizing
Synth command: npx ts-node main.ts
Error: non-zero exit code 1
Command output on stderr:
Error: Cannot find module '/usr/local/home/user/code/terraform-cdk/node_modules/cdktf/lib/index.js'. Please verify that the package.json has a valid "main" entry
at tryPackage (node:internal/modules/cjs/loader:409:19)
at Function.Module._findPath (node:internal/modules/cjs/loader:651:18)
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:1025:27)
at Function.Module._resolveFilename.sharedData.moduleResolveFilenameHook.installedValue [as _resolveFilename] (/usr/local/home/user/code/terraform-cdk/node_modules/@cspotcode/source-map-support/source-map-support.js:811:30)
at Function.Module._load (node:internal/modules/cjs/loader:885:27)
at Module.require (node:internal/modules/cjs/loader:1105:19)
at require (node:internal/modules/cjs/helpers:103:18)
at Object.<anonymous> (/usr/local/home/user/code/terraform-cdk/examples/typescript/main.ts:4:1)
at Module._compile (node:internal/modules/cjs/loader:1218:14)
at Module.m._compile (/usr/local/home/user/code/terraform-cdk/node_modules/ts-node/src/index.ts:1618:23) {
code: 'MODULE_NOT_FOUND',
path: '/usr/local/home/user/code/terraform-cdk/node_modules/cdktf/package.json',
requestPath: 'cdktf'
}
Can you provide a bit more context? what commands did you run after cloning the repository to get to this error message as Iām unable to replicate it?