0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

[windows,aws sam]sam initした際に「MAX_PATH should be enabled in the Windows registry.」と表示され失敗する時の対処法

Last updated at Posted at 2023-01-11

windows環境下だとsamをテンプレートつきでinitしようとした際に、

Error: Failed to modify a local file when cloning app templates. MAX_PATH should be enabled in the Windows registry.

とエラーが表示されることがあります。
パス長の最大値を無効化する設定を行う必要があるようです。

管理者権限でPowershellを実行し以下のコマンドを実行しましょう。

New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem" `
-Name "LongPathsEnabled" -Value 1 -PropertyType DWORD -Force

これでテンプレートからcloneすることができるようになります。


[参考] aws samのgitのissue

2022年7月に報告された内容で、現在msiファイルの修正中っぽいので、
近いうちに不要になる記事かもしれません。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?