running cdk bootstrap with an existing cdk.json fails attempting to execute `app`
- Dominant language
- TypeScript
- Stars
- 12.9k
- Forks
- 4.6k
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 83
Description
### Describe the bug
I have a `cdk.json` file in my directory with the following contents
```
{
"app": "tsx cdk.ts",
"debug": true
}
```
When I try to run bootstrap in this directory with `pnpm dlx` I receive an error saying `tsx` is not found.
```
➜ pnpm dlx aws-cdk bootstrap aws:///us-east-1
o
/bin/sh: tsx: command not found
Subprocess exited with error 127
```
Unlike `npx`, `pnpm dlx` (and similar with yarn) will reach out to the registry to execute instead of the local node_modules. Granted I do have the CLI in this project locally, but I thought it was odd to receive this error when running bootstrap
### Regression Issue
- [ ] Select this option if this issue appears to be a regression.
### Last Known Working CDK Version
_No response_
### Expected Behavior
running `cdk bootstrap` does not execute the app
### Current Behavior
see description
### Reproduction Steps
1. `pnpm init`
2. add cdk.json from description
3. run `pnpm dlx aws-cdk bootstrap ...`
4. observe error
### Possible Solution
_No response_
### Additional Information/Context
_No response_
### CDK CLI Version
2.154.1 (build febce9d)
### Framework Version
_No response_
### Node.js Version
22.x
### OS
macos
### Language
TypeScript
### Language Version
_No response_
### Other information
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.