Open ivanovvitaly opened 4 months ago
@ivanovvitaly Good morning. Thanks for opening the issue. Although, I'm unable to reproduce the issue:
v20.15.1 (LTS)
npm -g install typescript
(optional for .NET projects)npm install -g aws-cdk
Vitalii Ivanov
from command line.Vitalii Ivanov
.cdk init app --language csharp
dotnet build src
.cdk synth
cdk synth
successfully generated the below CloudFormation template without any error:
Resources:
CDKMetadata:
Type: AWS::CDK::Metadata
Properties:
Analytics: v2:deflate64:H4sIAAAAAAAA/yXGsQ6CMBCA4Wdhp9dWjAmDg6muDGjYoZzJid6R9tCB+O6GmH/4/h34fQ2u6D/ZxHEyTxpgvWofpzLcucUsS4q4fRAeSUn4W55FG1R7AAeVt9BcbkESnubZdJgyCR/fFXjrwW0Vj0xk0sJKL4T27w9sliIieAAAAA==
Metadata:
aws:cdk:path: VitaliiIvanovStack/CDKMetadata/Default
Condition: CDKMetadataAvailable
Conditions:
CDKMetadataAvailable:
Fn::Or:
- Fn::Or:
- Fn::Equals:
- Ref: AWS::Region
- af-south-1
- Fn::Equals:
- Ref: AWS::Region
- ap-east-1
- Fn::Equals:
- Ref: AWS::Region
- ap-northeast-1
- Fn::Equals:
- Ref: AWS::Region
- ap-northeast-2
- Fn::Equals:
- Ref: AWS::Region
- ap-south-1
- Fn::Equals:
- Ref: AWS::Region
- ap-southeast-1
- Fn::Equals:
- Ref: AWS::Region
- ap-southeast-2
- Fn::Equals:
- Ref: AWS::Region
- ca-central-1
- Fn::Equals:
- Ref: AWS::Region
- cn-north-1
- Fn::Equals:
- Ref: AWS::Region
- cn-northwest-1
- Fn::Or:
- Fn::Equals:
- Ref: AWS::Region
- eu-central-1
- Fn::Equals:
- Ref: AWS::Region
- eu-north-1
- Fn::Equals:
- Ref: AWS::Region
- eu-south-1
- Fn::Equals:
- Ref: AWS::Region
- eu-west-1
- Fn::Equals:
- Ref: AWS::Region
- eu-west-2
- Fn::Equals:
- Ref: AWS::Region
- eu-west-3
- Fn::Equals:
- Ref: AWS::Region
- il-central-1
- Fn::Equals:
- Ref: AWS::Region
- me-central-1
- Fn::Equals:
- Ref: AWS::Region
- me-south-1
- Fn::Equals:
- Ref: AWS::Region
- sa-east-1
- Fn::Or:
- Fn::Equals:
- Ref: AWS::Region
- us-east-1
- Fn::Equals:
- Ref: AWS::Region
- us-east-2
- Fn::Equals:
- Ref: AWS::Region
- us-west-1
- Fn::Equals:
- Ref: AWS::Region
- us-west-2
Parameters:
BootstrapVersion:
Type: AWS::SSM::Parameter::Value<String>
Default: /cdk-bootstrap/hnb659fds/version
Description: Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]
Rules:
CheckBootstrapVersion:
Assertions:
- Assert:
Fn::Not:
- Fn::Contains:
- - "1"
- "2"
- "3"
- "4"
- "5"
- Ref: BootstrapVersion
AssertDescription: CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI.
I changed $env:TMP
to D:\cdkrepro\Vitalii Ivanov
temporarily and got the below error:
Unhandled exception. node:internal/modules/cjs/loader:1148
throw err;
^
Error: Cannot find module 'D:\cdkrepro\Vitalii'
at Module._resolveFilename (node:internal/modules/cjs/loader:1145:15)
at Module._load (node:internal/modules/cjs/loader:986:27)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:174:12)
at node:internal/main/run_main_module:28:49 {
code: 'MODULE_NOT_FOUND',
requireStack: []
}
Node.js v20.15.1
Amazon.JSII.Runtime.JsiiError: Child process exited unexpectedly!
at Amazon.JSII.Runtime.Services.Runtime.ReadResponse()
at Amazon.JSII.Runtime.Services.Client.ReceiveResponse[TResponse]()
at Amazon.JSII.Runtime.Services.Client.Hello()
at Amazon.JSII.Runtime.Services.ServiceContainer.BuildServiceProvider(ILoggerFactory loggerFactoryOverride)
at Amazon.JSII.Runtime.Services.ServiceContainer.<>c.<.cctor>b__8_0()
at System.Lazy`1.ViaFactory(LazyThreadSafetyMode mode)
at System.Lazy`1.ExecutionAndPublication(LazyHelper executionAndPublication, Boolean useDefaultConstructor)
at System.Lazy`1.CreateValue()
at System.Lazy`1.get_Value()
at Amazon.JSII.Runtime.Services.ServiceContainer.get_ServiceProvider()
at Amazon.JSII.Runtime.Deputy.JsiiTypeAttributeBase.Load(Assembly assembly)
at Amazon.JSII.Runtime.Deputy.JsiiTypeAttributeBase.Load(Assembly assembly)
at Amazon.JSII.Runtime.Deputy.DeputyBase..ctor(DeputyProps props)
at Constructs.Construct..ctor(DeputyProps props)
at Amazon.CDK.Stage..ctor(DeputyProps props)
at Amazon.CDK.App..ctor(IAppProps props)
at VitaliiIvanov.Program.Main(String[] args) in D:\cdkrepro\Vitalii Ivanov\src\VitaliiIvanov\Program.cs:line 12
Subprocess exited with error 3762504530
It appears that the default value of $env:TMP
is set to <<Drive>>:\Users\<<username>>\AppData\Local\Temp
on Windows machine. In your case, it is C:\Users\Vitalii Ivanov\AppData\Local\Temp
, which resulted in the error since your username contained space character.
So looks like the other issue https://github.com/aws/jsii/issues/1296 was not reopened after comment by other AWS SDK engineer.
I will transfer this issue to JSII repository.
Thanks, Ashish
@ashishdhingra Thanks a lot troubleshooting and quick response!
Describe the bug
I'm trying to walk through the CDK sample tutorial for the dotnet and getting an error when running
cdk synth
.Expected Behavior
The command runs successfully and produces CloudFormation template
Current Behavior
cdk synth
fails with an errorafter trying several times the error might be shorter like this
Reproduction Steps
cdk init app --language csharp
dotnet build src
cdk synth
orcdk list
Possible Solution
No response
Additional Information/Context
My home folder is
C:\Users\Vitalii Ivanov
, I suspect the space in my username causes the issue, but only fordotnet
project.CDK CLI Version
2.149.0 (build c8e5924)
Framework Version
No response
Node.js Version
20.15.1
OS
windows 11 - 22H2 (22621.3880)
Language
.NET
Language Version
.net 6
Other information
I wasn't able to reproduce the issue for the
typescript
project on the same machine.cdk init
generates .net 6 project, upgrading to .net 8 doesn't help.I tried to change the temporary folder location as described here and after that
cdk synth
produced CF template successfully for the dotnet project.