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 cope with space in windows username

See original GitHub issue

Describe the bug My username on my PC is “Ryan Kelly” when I attempt to run cdk synth I get the following error

Unhandled Exception: Amazon.JSII.Runtime.JsiiException: Child process exited unexpectedly: internal/modules/cjs/loader.js:584
    throw err;
    ^

Error: Cannot find module 'C:\Users\Ryan'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:582:15)
    at Function.Module._load (internal/modules/cjs/loader.js:508:25)

C:\source\hg\sentric-rights-serverless\infra\cdk>cdk synth

Unhandled Exception: Amazon.JSII.Runtime.JsiiException: Child process exited unexpectedly: internal/modules/cjs/loader.js:584
    throw err;
    ^

Error: Cannot find module 'C:\Users\Ryan'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:582:15)
    at Function.Module._load (internal/modules/cjs/loader.js:508:25)
    at Function.Module.runMain (internal/modules/cjs/loader.js:754:12)
    at startup (internal/bootstrap/node.js:283:19)
    at bootstrapNodeJSCore (internal/bootstrap/node.js:622:3)

   at Amazon.JSII.Runtime.Services.Runtime.ReadResponse()
   at Amazon.JSII.Runtime.Services.Client.ReceiveResponse[TResponse]()
   at Amazon.JSII.Runtime.Services.ServiceContainer.BuildServiceProvider(ILoggerFactory loggerFactoryOverride)
   at System.Lazy`1.ViaFactory(LazyThreadSafetyMode mode)
   at System.Lazy`1.ExecutionAndPublication(LazyHelper executionAndPublication, Boolean useDefaultConstructor)
   at System.Lazy`1.CreateValue()
   at Amazon.JSII.Runtime.Deputy.JsiiTypeAttributeBase.Load(Assembly assembly)
   at Amazon.JSII.Runtime.Deputy.JsiiTypeAttributeBase.Load(Assembly assembly)
   at Amazon.JSII.Runtime.Deputy.JsiiClassAttribute..ctor(Type nativeType, String fullyQualifiedName, String parametersJson)
   at System.Reflection.CustomAttribute._CreateCaObject(RuntimeModule pModule, IRuntimeMethodInfo pCtor, Byte** ppBlob, Byte* pEndBlob, Int32* pcNamedArgs)
   at System.Reflection.CustomAttribute.CreateCaObject(RuntimeModule module, IRuntimeMethodInfo ctor, IntPtr& blob, IntPtr blobEnd, Int32& namedArgs)
   at System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeModule decoratedModule, Int32 decoratedMetadataToken, Int32 pcaCount, RuntimeType attributeFilterType, Boolean mustBeInheritable, IList derivedAttributes)
   at System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeType type, RuntimeType caType, Boolean inherit)
   at System.Attribute.GetCustomAttributes(MemberInfo element, Type type, Boolean inherit)
   at System.Attribute.GetCustomAttribute(MemberInfo element, Type attributeType, Boolean inherit)
   at System.Reflection.CustomAttributeExtensions.GetCustomAttribute[T](MemberInfo element)
   at Amazon.JSII.Runtime.ReflectionUtils.GetClassAttribute(Type type)
   at Amazon.JSII.Runtime.Deputy.DeputyBase..ctor(DeputyProps props)
   at HelloCdk.Program.Main(String[] args) in C:\source\hg\sentric-rights-serverless\infra\cdk\src\HelloCdk\Program.cs:line 12
Subprocess exited with error 3762504530

To Reproduce cdk init --language csharp dotnet build src cdk synth

Expected behavior Be able to run cdk synth to generate the CloudFormation template

Version:

  • OS Windows 10
  • Programming Language C#
  • CDK Version 0.31.0 (build 7a70c08)

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:4
  • Comments:11 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
olmelabscommented, Sep 3, 2020

I was able to workaround it by temporary setting TEMP and TMP environment variables to “C:\temp”, so it is not going into my profile folder.

0reactions
github-actions[bot]commented, Jun 18, 2022

This issue has not received any attention in 1 year. If you want to keep this issue open, please leave a comment below and auto-close will be canceled.

Read more comments on GitHub >

github_iconTop Results From Across the Web

I had to rename my username because it had a space in it ...
Thus changing my username and username folder "User Name" to "User" so it had no space. This worked for the programs I was...
Read more >
Help! I put a space in my Windows User Name. Now What?
The simplest way to solve this is to delete the account and make a new one. If you're like me and already began...
Read more >
What are some compelling reasons to disallow spaces in ...
Usernames typically don't contain spaces, so allowing users to type in an invalid input and silently removing the space is overly presumptuous ...
Read more >
What are workaround steps if Windows user name ... - GitHub
Various tools based on Conda (the Anaconda command line and Navigator in my case) still cannot handle spaces in Windows folder names.
Read more >
Windows 10 - Username with whitespace and PATH [closed]
I think this is an issue with the whitespace in the path to the variables. I tried renaming my username to M.Sustersic ,...
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