Yarn install fails on random package but always shows same kind of error "Extracting tar content of undefined failed, the file appears to be corrupt: "ENOENT: no such file or directory, "
Extracting tar content of undefined failed, the file appears to be corrupt: "ENOENT: no such file or directory, chmod '/usr/local/share/.cache/yarn/v6/npm-@babel-core-7.12.10-b79a2e1b9f70ed3d84bbfb6d8c4ef825f606bccd-integrity/node_modules/@babel/core/lib/transform-ast.js'"
It seems to working in any machine except the bitbucket pipeline I have issues with.
@Theodora Boudale For us, this happens intermittently every day.
"yarn install --network-concurrency 1" helps, but doesn't solve it.
Sometimes it only resolves after clearing the pipeline cache.
Config:
image: node:16
definitions:
caches:
yarn: /usr/local/share/.cache/yarn
nodemodules: $BITBUCKET_CLONE_DIR/node_modules
jest: $BITBUCKET_CLONE_DIR/jest_cache
steps:
- step: &test-step
name: Test
caches:
- nodemodules
- jest
- yarn
script:
- yarn install --network-timeout 60000 --network-concurrency 1
- yarn test:ci
- step: &lint-step
name: Code linting
caches:
- nodemodules
- yarn
script:
- yarn install --network-timeout 60000 --network-concurrency 1
- yarn lint:tsc:ci
pipelines:
branches:
"{dev,hmg,master}":
- step: *lint-step
- step: *test-step
pull-requests:
"**":
- step: *lint-step
- step: *test-step
We're seeing this issue as well. Always via bitbucket pipeline only with the following command.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
We only began encountering this when using yarn. The issue never occurred with npm
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I see this issue consistently on bitbucket pipelines and never on the local with same code.
Workaround is to set network concurrency to 1 for yarn, which is not ideal as it drastically slows the install process: `yarn install --network-concurrency 1`
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Balakrishnan S ,
Does the issue occur on every build or is it random failures?
Are you able to reproduce this error if you debug the build locally with Docker, as per the following documentation?
I would suggest debugging this locally as per the instructions above, by taking a clone of the repo, reset to a commit where you had a failed build with this error, and then test it with a Docker container that uses the same image as your Pipelines build.
If the same issue occurs when you debug this locally with Docker, this would indicate that the issue is most likely related to either the Docker image used for the build, the configuration or a dependency.
Please feel free to let me know how it goes.
Kind regards,
Theodora
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I can confirm that this happens every time when I push to bitbucket but not when I run locally in a docker container
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.