Окружающая среда
- WSL2 Ubuntu 20.04 из Windows 10 Домашняя
- Linux .Net Core 3.1
- Узел 12.18.3 + NPM 6.14.6 + Пряжа 1.22.5
Проблема
Я следую быстрому запуску SAFE Stack, но сценарий сборки FAKE не работает:
$ dotnet fake build --target run
Но FAKE не может найти двоичный файл npm
:
Target Duration
------ --------
Clean 00:00:00.0053439
InstallClient 00:00:00.1517122 (npm was not found in path. Please install it and make sure it's available from your path. See https://safe-stack.github.io/docs/quickstart/#install-pre-requisites for more info)
Вопрос
При вставке отладочных сообщений создается впечатление, что сценарий FAKE build.fsx
разрешает PATH из хоста Windows, а не из среды WSL2 Linux:
DEBUG: Some "C:\Program Files\Git\usr\bin\ls.EXE"
Пример из сценария:
// My Debug
printfn "DEBUG: %A" (ProcessUtils.tryFindFileOnPath "ls")
// The actual script
let npmPath =
match ProcessUtils.tryFindFileOnPath "npm" with
| Some path -> path
| None ->
"npm was not found in path. Please install it and make sure it's available from your path. "
+ "See https://safe-stack.github.io/docs/quickstart/#install-pre-requisites for more info"
|> failwith
= ›Это ошибка или мне что-то здесь не хватает? (я новичок в .Net и F #)