PyCharm shows an exception like this:
java.lang.RuntimeException: Could not execute `sam init`!: [Cloning from https://github.com/aws/aws-sam-cli-app-templates (process may take a moment), Error: Unstable state when updating repo. Check that you have permissions to create/delete files in C:\Users\user\AppData\Roaming\AWS SAM directory or file an issue at https://github.com/aws/aws-sam-cli/issues] at software.aws.toolkits.jetbrains.services.lambda.wizard.SamInitRunner.execute$lambda-1(SamInitRunner.kt:55)
This happens because the PATH variable on Windows 11 is limited to 260 chars (no idea why).
The fix is easy: Open Registry Editor (type "regedit" in Windows Search box)
and go to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem
then change the value for "LongPathsEnabled" from 0 to 1.
No comments:
Post a Comment