Yarn prints No lockfile found
, although a yarn.lock
file does exist:
#!/bin/bash -eo pipefail
ls -a && yarn install --frozen-lockfile --cache-folder ~/.cache/yarn
. .gitignore .vscode nodejs.d.ts
.. .ignore __mocks__ package.json
.circleci .npmrc babel.config.js services
.editorconfig .nvmrc infrastructure tooling
.eslintrc.js .prettierignore jest.unit.config.js tsconfig.json
.git .prettierrc.js lib yarn.lock
.github .tool-versions lint-staged.config.js
yarn install v1.22.5
[1/4] Resolving packages...
[2/4] Fetching packages...
info No lockfile found
And then, it goes on to fail with the following error (the package that fails is not always the same):
[3/5] Fetching packages...
error https://registry.yarnpkg.com/yargs/-/yargs-15.4.1.tgz: Extracting tar content of undefined failed, the file appears to be corrupt: "ENOENT: no such file or directory, chmod '/home/circleci/.cache/yarn/v6/npm-yargs-15.4.1-0d87a16de01aee9d8bec2bfbf74f67851730f4f8-integrity/node_modules/yargs/locales/pl.json'"
To rule out a problem with the cache, the cache restoration step doesn’t find a hit, which is expected:
No cache is found for key: v2-yarn-cache-Ojz5x6Ac2zSAU1v7NJ2eg7wNFcg3NYNmISIFx8o23sk=
I cannot reproduce this behaviour locally.
Has anybody else experienced this issue?