WSL Terminal: CMD.EXE was started with the above path as the current directory. UNC paths are not supported. #22350

Closed
opened 2026-01-31 08:10:32 +00:00 by claunia · 3 comments
Owner

Originally created by @siddhsql on GitHub (Oct 5, 2024).

Windows Terminal version

1.20.11781.0

Windows build number

10.0.22631.4169

Other Software

No response

Steps to reproduce

I tried to run npm run build from WSL home directory and get this error:

'\\wsl.localhost\Ubuntu\home\xxx\xxx'
CMD.EXE was started with the above path as the current directory.
UNC paths are not supported.  Defaulting to Windows directory.

It then defaults to c:\Windows and causes further problems as that is not the right directory.

Expected Behavior

no error

Actual Behavior

'\\wsl.localhost\Ubuntu\home\xxx\xxx'
CMD.EXE was started with the above path as the current directory.
UNC paths are not supported.  Defaulting to Windows directory.

It then defaults to c:\Windows and causes further problems as that is not the right directory.

Originally created by @siddhsql on GitHub (Oct 5, 2024). ### Windows Terminal version 1.20.11781.0 ### Windows build number 10.0.22631.4169 ### Other Software _No response_ ### Steps to reproduce I tried to run `npm run build` from **WSL** home directory and get this error: ``` '\\wsl.localhost\Ubuntu\home\xxx\xxx' CMD.EXE was started with the above path as the current directory. UNC paths are not supported. Defaulting to Windows directory. ``` It then defaults to `c:\Windows` and causes further problems as that is not the right directory. ### Expected Behavior no error ### Actual Behavior ``` '\\wsl.localhost\Ubuntu\home\xxx\xxx' CMD.EXE was started with the above path as the current directory. UNC paths are not supported. Defaulting to Windows directory. ``` It then defaults to `c:\Windows` and causes further problems as that is not the right directory.
claunia added the Needs-TriageIssue-BugNeeds-Attention labels 2026-01-31 08:10:33 +00:00
Author
Owner

@DHowett commented on GitHub (Oct 5, 2024):

The problem is that your Linux NPM setup is trying to use CMD. Why is that?

@DHowett commented on GitHub (Oct 5, 2024): The problem is that your Linux NPM setup is trying to use CMD. Why is that?
Author
Owner

@siddhsql commented on GitHub (Oct 5, 2024):

Solved: https://stackoverflow.com/a/75407212/147530

@siddhsql commented on GitHub (Oct 5, 2024): Solved: https://stackoverflow.com/a/75407212/147530
Author
Owner

@DHowett commented on GitHub (Oct 5, 2024):

Good find! Thanks for following up.

@DHowett commented on GitHub (Oct 5, 2024): Good find! Thanks for following up.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#22350