-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Yarn fails and doesn't provide information when running inside Docker #1460
Comments
Hi @felixsanz! Is that happening when you run
Is your container running Ubuntu by any chance? If so, you'll need to install the |
The other alternative is to mount a directory ( |
I'm gonna close this because deleting the yarn.lock file fixed the issue and i don't get the error anymore. Probably it was messed up while i was trying builds. If happens again i'll try your suggestions and comment here again. Thanks! |
I'm in a similar situation with VSTS build machines. @Daniel15 your suggested steps are great 😊 thanks! I resolved the problem by adding a cmd task that runs if a previous task has failed and prints the contents of if exist yarn-error.log echo "Found error output in yarn-error.log:" && type yarn-error.log && del yarn-error.log Edit: ...and a PowerShell equivalent: $yarnErrorFile = "yarn-error.log"
if (Test-Path $yarnErrorFile)
{
Write-Output "Found error output in $yarnErrorFile"
Get-Content $yarnErrorFile | Write-Output
Remove-Item $yarnErrorFile
} |
Fast forwarding to 2022 and Yarn 2+ that's what helped me debug the issue: |
Do you want to request a feature or report a bug?
Bug
What is the current behavior?
If the current behavior is a bug, please provide the steps to reproduce.
I don't know, I can't check the error :)
What is the expected behavior?
It should print errors directly to stdout/stderr. I'm trying to build a Docker image and it fails. But since this happens inside the container (and destroyed on the error step), I can't check that yarn-error.log because it doesn't exist anymore.
Please mention your node.js, yarn and operating system version.
Yarn 0.16.1 using Docker
The text was updated successfully, but these errors were encountered: