简体   繁体   中英

error Couldn't find match for "ref:" when running builds using jenkins-slave using docker containers

I'm getting below error when running jenkins CI build in a jenkins-slave using docker containers.

error Couldn't find match for "ref:" in "refs/heads/1zq22b_docker-img-update,refs/heads/1zq22b_jenkins-slave,refs/heads/1zq22b_jenkins-slave-test,refs/heads/DIFF-1985_db_tool_restore,refs/heads/master" for "ssh://git@github.com/DifferentTech/ops.git".
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
warning sha.js@2.4.11: Invalid bin entry for "sha.js" (in "sha.js").

these builds uses yarn for dependency installation. But however when I run the same job inside jenkins master it runs without these errors.

it runs four steps,

[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...

it fails at 2nd step Fetching packages giving above error

I had a similar issue with installing modules for a web application on my local system. I somehow found out to be an issue with local AppData which gets stored in a system by applications. Not aware of the entire usage but it seemed like a cache for node modules which is local to the system/PC and is a hidden folder. In Windows, it stays in

 C:\Users\{USER_NAME}\AppData\Local\Yarn\.tmp

I deleted the .tmp folder to get rid of old caches, maybe some commit mismatch in some package causes the whole issue. Not sure here.

Not sure whether this will help you but try cleaning cache for yarn/npm. Maybe yarn cache clean works for you and does the same thing which I did the hard way. Please reply if that works or whatever works/has worked out for you.

Also, if someone stumbles upon this one, a small request, please could you post links/docs to the entire caching stuff that goes behind yarn. Thanks.

You need to remove your "yarn.lock".

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM