"Failed to translate C:\..." when running 'npm run build" on Github commit on Umbraco Cloud project
Hi,
I have an Umbraco Cloud project where I want to run 'npm run build' before a commit from Github Desktop is made.
I therefore have added file .git\hooks\pre-commit:
#!/bin/sh
# Run npm build script
echo "Running npm run build..."
npm run build
# Check if npm run build succeeded
if [ $? -ne 0 ]; then
echo "npm run build failed, aborting commit."
exit 1
fi
exit 0
But then I get this error:
Running npm run build...
<3>WSL (10) ERROR: CreateProcessParseCommon:708: Failed to translate C:\my\project\folder\UmbracoCloud\dev-myproject-website
<3>WSL (10) ERROR: CreateProcessParseCommon:754: getpwuid(0) failed 2
<3>WSL (10) ERROR: UtilTranslatePathList:2866: Failed to translate C:\Users\marti\AppData\Local\GitHubDesktop\app-3.3.12\resources\app\git\mingw64\libexec\git-core
<3>WSL (10) ERROR: UtilTranslatePathList:2866: Failed to translate C:\Users\marti\AppData\Local\GitHubDesktop\app-3.3.12\resources\app\git\mingw64\bin
<3>WSL (10) ERROR: UtilTranslatePathList:2866: Failed to translate C:\Users\marti\AppData\Local\GitHubDesktop\app-3.3.12\resources\app\git\usr\bin
<3>WSL (10) ERROR: UtilTranslatePathList:2866: Failed to translate C:\Users\marti\bin
<3>WSL (10) ERROR: UtilTranslatePathList:2866: Failed to translate C:\Users\marti\AppData\Local\GitHubDesktop\app-3.3.12\resources\app\git\mingw64\bin
<3>WSL (10) ERROR: UtilTranslatePathList:2866: Failed to translate C:\Users\marti\AppData\Local\GitHubDesktop\app-3.3.12\resources\app\git\mingw64\usr\bin
<3>WSL (10) ERROR: UtilTranslatePathList:2866: Failed to translate C:\Python312\Scripts
<3>WSL (10) ERROR: UtilTranslatePathList:2866: Failed to translate C:\Python312
<3>WSL (10) ERROR: UtilTranslatePathList:2866: Failed to translate C:\Windows\system32
<3>WSL (10) ERROR: UtilTranslatePathList:2866: Failed to translate C:\Windows
<3>WSL (10) ERROR: UtilTranslatePathList:2866: Failed to translate C:\Windows\System32\Wbem
<3>WSL (10) ERROR: UtilTranslatePathList:2866: Failed to translate C:\Windows\System32\WindowsPowerShell\v1.0
<3>WSL (10) ERROR: UtilTranslatePathList:2866: Failed to translate C:\Windows\System32\OpenSSH
<3>WSL (10) ERROR: UtilTranslatePathList:2866: Failed to translate C:\Program Files\dotnet
<3>WSL (10) ERROR: UtilTranslatePathList:2866: Failed to translate C:\Program Files\Microsoft SQL Server\150\Tools\Binn
<3>WSL (10) ERROR: UtilTranslatePathList:2866: Failed to translate C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn
<3>WSL (10) ERROR: UtilTranslatePathList:2866: Failed to translate C:\ProgramData\chocolatey\bin
<3>WSL (10) ERROR: UtilTranslatePathList:2866: Failed to translate C:\Program Files (x86)\Microsoft SQL Server\160\DTS\Binn
<3>WSL (10) ERROR: UtilTranslatePathList:2866: Failed to translate C:\Program Files\Azure Data Studio\bin
<3>WSL (10) ERROR: UtilTranslatePathList:2866: Failed to translate C:\Program Files\Docker\Docker\resources\bin
<3>WSL (10) ERROR: UtilTranslatePathList:2866: Failed to translate C:\Program Files\Git\cmd
<3>WSL (10) ERROR: UtilTranslatePathList:2866: Failed to translate C:\Users\marti\AppData\Local\pnpm
<3>WSL (10) ERROR: UtilTranslatePathList:2866: Failed to translate C:\Users\marti\AppData\Local\Microsoft\WindowsApps
<3>WSL (10) ERROR: UtilTranslatePathList:2866: Failed to translate C:\Users\marti\AppData\Local\Programs\Microsoft VS Code\bin
<3>WSL (10) ERROR: UtilTranslatePathList:2866: Failed to translate C:\Users\marti\.dotnet\tools
<3>WSL (10) ERROR: UtilTranslatePathList:2866: Failed to translate C:\Users\marti\AppData\Local\GitHubDesktop\bin
<3>WSL (10) ERROR: UtilTranslatePathList:2866: Failed to translate C:\Users\marti\AppData\Roaming\npm
<3>WSL (10) ERROR: UtilTranslatePathList:2866: Failed to translate C:\Program Files\Azure Data Studio\bin
<3>WSL (10) ERROR: UtilTranslatePathList:2866: Failed to translate C:\Program Files\PostgreSQL\16\bin
<3>WSL (10) ERROR: UtilTranslatePathList:2866: Failed to translate C:\Users\marti\AppData\Local\Google\Cloud SDK\google-cloud-sdk\bin
<3>WSL (10) ERROR: UtilTranslatePathList:2866: Failed to translate C:\Users\marti\AppData\Roaming\nvm
<3>WSL (10) ERROR: UtilTranslatePathList:2866: Failed to translate C:\Program Files\nodejs
<3>WSL (10) ERROR: CreateProcessEntryCommon:331: getpwuid(0) failed 2
<3>WSL (10) ERROR: CreateProcessEntryCommon:502: execvpe /bin/bash failed 2
<3>WSL (10) ERROR: CreateProcessEntryCommon:505: Create process not expected to return
npm run build failed, aborting commit.
I am not using WSL so I don't understand the error.
"Failed to translate C:\..." when running 'npm run build" on Github commit on Umbraco Cloud project
Hi,
I have an Umbraco Cloud project where I want to run 'npm run build' before a commit from Github Desktop is made.
I therefore have added file .git\hooks\pre-commit:
But then I get this error:
I am not using WSL so I don't understand the error.
is working on a reply...