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?

wsl2 で、npm run build したら、CMD.EXE was started with the above path as the current directory. UNC paths are not supported. Defaulting to Windows directory. って出たときの対処法

Posted at

背景

python playwright を動かそうとして、上手くいかないと思ってたら
front build してないことに気付く

で、やってみたら、以下のようなエラーになったときの対処法

build
$ npm run build

> frontend@0.0.0 build
> tsc && vite build

'\\wsl.localhost\Ubuntu-22.04\home\{user}\{project}\app\frontend'
CMD.EXE was started with the above path as the current directory.
UNC paths are not supported.  Defaulting to Windows directory.

結論

/mnt の下に、デフォルトで windows の drive が mount されているので、そこで作業すればよい

試行錯誤

:ng: drive mapping

  • cmd ならよくやる、Z: に割り付け、とかで対処しようとしたら、何故か wsl2 が wsl1 に downgrade されるという珍現象に遭遇したので、やめ。

これが原因だったのかは不明ではあるが、他に記憶なし・・
その際の備忘録は以下

:construction: Linux Drive を作って、mount

drive 作って mount したあとで、/mnt/c, /mnt/e を発見し・・不要だったことに気付く :sweat:

あとがき

問題起きると本題からそれていって余分な時間がかかるのが辛いね

しかも慣れてない世界だとササッと解決できない。

まぁ、解決できると楽しいわけだけど :laughing:

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?