Skip to content

Commit d055dc3

Browse files
committed
fix: Add troubleshooting for Windows filename too long error
1 parent ee86c0b commit d055dc3

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

src/content/install/upgrade.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,29 @@ the Dart [`pub outdated` documentation]({{site.dart-site}}/tools/pub/cmd/pub-out
167167
$ flutter pub outdated
168168
```
169169

170+
<a id="troubleshooting" aria-hidden="true"></a>
171+
172+
## Troubleshooting
173+
174+
### Windows: "Filename too long" error
175+
176+
When running `flutter upgrade` on Windows, you might encounter an error like:
177+
178+
```text
179+
error: unable to create file ...: Filename too long
180+
```
181+
182+
This occurs because the path to a file in the Flutter SDK exceeds the default
183+
maximum path length limit on Windows.
184+
185+
To resolve this issue, enable long paths support in Git:
186+
187+
```console
188+
$ git config --system core.longpaths true
189+
```
190+
191+
If the command fails with a permission error, try running your terminal as an administrator.
192+
170193
[Flutter SDK archive]: /install/archive
171194
[flutter-announce]: {{site.groups}}/forum/#!forum/flutter-announce
172195
[pubspec.yaml]: {{site.dart-site}}/tools/pub/pubspec

0 commit comments

Comments
 (0)