question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to use cdk command on Windows

See original GitHub issue

Describe the bug Unable to run any cdk command on Windows OS after the project is initialized.

To Reproduce mkdir temp cd temp cdk init --language=typescript cdk synth

The following error occurs

'.' is not recognized as an internal or external command,
operable program or batch file.
Subprocess exited with error 1

If I open cdk.json and replace ‘/’ with ‘\’ then execute “cdk synth” again, it will succeed.

{
  "app": ".\\node_modules\\.bin\\ts-node bin/temp.ts"
}

Expected behavior Executing “cdk synth” on Windows OS should work without having to edit the cdk.json file.

Version:

  • OS: Windows 10
  • Programming Language: Typescript
  • CDK Version: 0.32.0

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

6reactions
advissorcommented, Oct 4, 2020

OS : WIndows Python : Python3 Local python returns a version via :

C:\Users\XXX>python --version
Python 3.7.5

python3 --version, returns nothing

When running cdk deploy I also saw a 9009 error, in my case this was a format of python call in cdk.json

This statement gave 9009 :

{
  "app": "python3 app.py"
}

Works :

{
  "app": "python app.py"
}

So, you need to adjust properly binary call in cdk.json

0reactions
Muhammadinaamcommented, Sep 8, 2020

Hi, I have the same problem here. But there’s no problem going into the virtual environment on the MAC and executing the SDK synth.But in win10 virtual environment after the implementation of the error

Subprocess exited with error 9009

I am also having this error

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unable to run cdk commands on my windows having python ...
Installed aws-cdk using pip on windows10. After restart, when i run cdk --version on cmd prompt, it says 'cdk' is not recognized as...
Read more >
Troubleshooting common AWS CDK issues
This topic describes how to troubleshoot the following issues with the AWS CDK.
Read more >
How to install AWS CDK (step-by-step guide)
To install AWS CDK, run the following command in your terminal: npm install -g aws-cdk .
Read more >
CDK tips, part 1 – how to use local CDK commands
When running cdk init , you obviously can't use a local version of the CLI, because there's no “local” yet – you're just...
Read more >
cdk init | AWS CDK Workshop
We will use cdk init to create a new Python CDK project: ... If for any reason the automatic creation of the virtualenv...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found