aws cdk returns jsii error on empty stack. Steps to reproduce are at the hello world level which makes me think that I have a version mismatch somewhere. I have re-installed aws cli, cdk and nodejs. Any suggestions on what to look for?
Steps to reproduce:
mkdir myfolder
cdk init --language python
.env\Scripts\activate.ps1
python -m pip install -r requirements.txt
cdk synth
Returns error AND an empty stack:
(.env) p$[myfolder]> cdk synth d:\myfolder\.env\lib\site-packages\jsii\_embedded\jsii\jsii-runtime.js:13295
throw e;
^
Error: EOF: end of file, read
at Object.readSync (fs.js:592:3)
at SyncStdio.readLine (d:\myfolder\.env\lib\site-packages\jsii\_embedded\jsii\jsii-runtime.js:13278:33)
at InputOutput.read (d:\myfolder\.env\lib\site-packages\jsii\_embedded\jsii\jsii-runtime.js:13203:34)
at KernelHost.run (d:\myfolder\.env\lib\site-packages\jsii\_embedded\jsii\jsii-runtime.js:13021:32)
at Immediate.<anonymous> (d:\myfolder\.env\lib\site-packages\jsii\_embedded\jsii\jsii-runtime.js:13029:37)
at processImmediate (internal/timers.js:461:21) {
errno: -4095,
syscall: 'read',
code: 'EOF'
}
Resources:
CDKMetadata:
Type: AWS::CDK::Metadata
Properties:
Modules: aws-cdk=1.69.0,@aws-cdk/cloud-assembly-schema=1.69.0,@aws-cdk/core=1.69.0,@aws-cdk/cx-api=1.69.0,@aws-cdk/region-info=1.69.0,jsii-runtime=Python/3.7.4
Metadata:
aws:cdk:path: myfolder/CDKMetadata/Default
Condition: CDKMetadataAvailable
Environment
- **CLI Version :aws-cli/2.0.61 Python/3.7.7 Windows/10 exe/AMD64
- **cdk Version:1.69.0 (build 2b474b9)
- **Node.js Version:v14.15.0
- **OS :Windows 10
- **Language (Version):python 3.7.4
Saw this error when I first started on cdk. But, 'cdk synth' showed a stack, so I pressed on. I was even able to 'cdk deploy' simple stacks. Eventually, as the code became only slightly more complex, jsii errors prevent stack creation. Code created by me throws errors on my machine but does NOT error on other machines. Working cdk code from other devs will not synth or deploy stacks on my machine.
So far, I have re-installed aws cli, node.js and cdk. Any ideas where the jsii error originate or how to fix them?