## TL;DR
Reinstall your dependencies: `rm -rf node_modules package-lock.json && npm install`, then re-run `cdktf synth`. The `cdktf` npm package itself is broken or partially installed.

## The error
```
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]/...'. Please verify that the package.json has a valid "main" entry
    ...
    code: 'MODULE_NOT_FOUND',
```

## Fix it
1. Delete the broken install: `rm -rf node_modules package-lock.json`.
2. Reinstall cleanly: `npm install`.
3. Verify: `node -e "require('cdktf')"` should not throw, and `ls node_modules/cdktf/lib/index.js` should exist.
4. Re-run `cdktf synth`.

Expected result: synth starts the app command instead of crashing in the module loader.

## When to use this
- `cdktf synth` fails with `Cannot find module ... cdktf/lib/index.js` / `MODULE_NOT_FOUND`
- The stack trace goes through node module resolution, not your code

## When NOT to use this
- The missing module is a provider binding (`./.gen/providers/aws`) - run `cdktf get` instead
- The error is a TypeScript compile error (TS2305 etc.)

## Root cause
The installed `cdktf` package is incomplete or corrupted (interrupted install, partial node_modules copy, or a version mismatch between the global cdktf-cli and the local cdktf library). Node resolves the package.json `main` entry to `lib/index.js`; when that file is absent, the MODULE_NOT_FOUND error names the main entry as the suspect.

## Edge cases
- Global vs local mismatch: `cdktf-cli` globally installed at one version with a local `cdktf` at another can confuse resolution; keep them in sync.
- In Docker builds, make sure `npm install` runs after `COPY package*.json` and that no `.dockerignore` excludes `lib`.