My yarn.lock
file looks like:
[email protected]:
version: "x.x.x"
resolved: "http://registry.yarnpkg.com/package/-/xxxx"
But the CI is in intranet and the registry is http://99.12.xx.xx/xxx
How to use intranet registry in CI build regardless of the internet registry in the yarn.lock
file?
This is an old issue on yarn's github repository as you can see here
I solved this issue by running a sed command to substitute the registry link before installing packages:
sed -i -e "s#https://registry.yarnpkg.com/#{YOUR_CI_REGISTRY}#g" yarn.lock
hope that helps.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With