We automated some of our react applications using Jenkins and Yarn. However, build is successful for few branches and fails for few
I am finding it to bit difficult to understand. Example of failed build is provided below
yarn cache
Removed yarn cache directories both 'system cache' and 'jenkins cache' (yarn cache clean inside jenkins job)
[root@jenkins ~]# ls -l /usr/local/share/.cache
ls: cannot access '/usr/local/share/.cache': No such file or directory
Error Message
error https://registry.yarnpkg.com/typescript/-/typescript-4.5.4.tgz: Extracting tar content of undefined failed, the file appears to be corrupt: "ENOENT: no such file or directory, stat '/var/lib/jenkins/.cache/yarn/v6/npm-typescript-4.5.4-a17d3a0263bf5c8723b9c52f43c5084edf13c2e8-
package.json
"typescript": "^4.1.2"
After removing cache folders and rebuilding resulted in following folders being created
Jenkins cache (/var/lib/jenkins/.cache/yarn/v6)
drwxr-xr-x 3 jenkins jenkins 26 Jan 5 04:44 npm-typescript-4.0.3-153bbd468ef07725c1df9c77e8b453f8d36abba5-integrity
drwxr-xr-x 3 jenkins jenkins 26 Jan 5 04:44 npm-typescript-4.5.4-a17d3a0263bf5c8723b9c52f43c5084edf13c2e8-integrity
I would like to understand how and why npm-typescript-4.0.3 and npm-typescript-4.5.4 directories were created in .cache folder when a different version "typescript": "^4.1.2" is mentioned in package.json