Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to use cdk command on Windows #2657

Closed
Iamz opened this issue May 28, 2019 · 6 comments · Fixed by #2660
Closed

Unable to use cdk command on Windows #2657

Iamz opened this issue May 28, 2019 · 6 comments · Fixed by #2660
Labels
bug This issue is a bug.

Comments

@Iamz
Copy link
Contributor

Iamz commented May 28, 2019

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
@Iamz Iamz added the bug This issue is a bug. label May 28, 2019
@eladb
Copy link
Contributor

eladb commented May 28, 2019

@Iamz thanks for reporting. Can you try to change app in cdk.json to be npx ts-not bin/temp.ts and let us know if this works.

@Iamz
Copy link
Contributor Author

Iamz commented May 28, 2019

@eladb Yes, changing app to npx ts-node bin/temp.ts fixes the problem.

@eladb
Copy link
Contributor

eladb commented May 28, 2019

Awesome. We'll fix this (unless you are interested in submitting a PR :-))

@15b883
Copy link

15b883 commented May 14, 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

@Muhammadinaam
Copy link

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

@advissor
Copy link

advissor commented 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants