Closed schneidmaster closed 6 years ago
You are not alone! Do not panic!
I got the same issue on my builds.
OK.. I'm panicking..
It is worth noting the issue happens when trying to visit the npm registry and thus is probably not yarn's fault. http://registry.npmjs.com/
Same here on Win 10 with Yarn 1.7.0.
Interestingly, I'm also getting the error for the npm registry page, as @sandersky noted, but npm install
works perfectly whereas yarn
fails for the very same project (and I do not have all the dependencies locally cached),
@sandersky No, it's Cloudflare fault. Sorry, it's npm fault they make changes in the registry which is pushed to Cloudflare, impacting yarn. https://status.npmjs.org/incidents/t3j62lxb7jg3
@sandersky Interesting -- though npm is having a different issue (Error 1016 compared to 1014 for yarn). 1016 sounds like a more garden-variety DNS error (Cloudflare simply can't resolve the DNS hostname) while 1014 is an error about a DNS record pointing at a domain in a different Cloudflare account. I wonder if npm's issue is causing yarn's, or if Cloudflare threw the switch on something that broke both at the same time.
Maybe Cloudflare broke something, never deploy changes on a friday. 🍺
npm install
works, but yarn install
fails.
@sandersky Oh, npm's registry lives at https://registry.npmjs.org (not .com
). It seems to be working fine, which explains why everyone can npm install
successfully.
https://status.yarnpkg.com/ is green; hopefully somebody from Yarn will get on top of this.
According to https://status.npmjs.org/ npm is making changes to their registry. My guess is that one of those changes was moving to Cloudflare. And as Cloudflare doesn't allow CNAMEs that point to other domains that also make use of Cloudflare, I'm guessing that that's what happened here.
Possible solutions for this problem are
yarn ded :( - now my colleagues say "see - npm is the best option" and I lose all my hard work in making everyone use it :-P
heh - anyway - im sure you guys will figure it out
+1 on both dev machines and AWS CI machines.
The fun stuff is that I just switched to yarn because of npm issues (e.g. https://github.com/npm/npm/issues/20434) And 10 mins later yarn registry is failing. Lol 😄
@arunesh90 how do you make yarn
use npmjs
registry?
npm confirmed that they are currently moving to CloudFlare (tweet). So it sounds like @arunesh90's explanation is the right one.
@jakwuh let's go back to PHP.. :rofl:
Getting 403s too 😭
To quote @alexbrazier never deploy on a Friday (or ever. You can't break anything if you don't change anything).
As a temporary workaround you can config yarn
to use the npm registry :
yarn config set registry "https://registry.npmjs.org"
Edit: @jaredLunde noted that it doesn't work with yarn install
, use yarn install --no-lockfile
@fathyb MY HERO! <3
https://status.yarnpkg.com/ should probably reflect registry is down.
@avivahl npm was indeed testing if status.yarnpkg.com is working, whenever the registry is down. And it's not :upside_down_face:
It seems the yarn team has fixed the issue and added a http redirect to https://skimdb.npmjs.com/?
@BirknerAlex my installations are still failing.
Strange. If I open up the url I get redirected to the npm url on my workstation. But on my server it's still failing. Maybe a DNS caching issue.
yarn config set registry "https://registry.npmjs.org"
For some reason this doesn't seem to work with yarn install
. Only working w/ yarn add
for me...
The workaround won't work if you have a yarn.lock
file.
@jzila yep that's it
@jzila yarn --no-lockfile
~yarn install --force
if you want to keep locked versions~ use yarn --no-lockfile
Now the hostname does not be resolved anymore for me.
curl https://registry.yarnpkg.com
curl: (6) Could not resolve host: registry.yarnpkg.com
I give up and take a beer and try it later again :beer:
Ahhh glad to see we aren't the only ones.
Yarn's team is now aware of the issue and working on fixing it (https://twitter.com/arcanis/status/1000151453476978689)
Hey, folks. https://github.com/yarnpkg/yarn/issues/5885#issuecomment-392209518
Probably you already know this, but just in case, if you're going to create an HTTP redirect (ie, 301 or 302 and a location:
header), it should be to https://registry.npmjs.org, not http://skimdb.npmjs.com. SkimDB is the couchdb replication endpoint only, it doesn't have package tarballs.
lol it's the first time that I see an issue which concerns me in real time. Epic ! x)
We are all witnesses of an Black Yarnday! Wake up CloudFlare DevOps! You broke something.
I was just following jest tutorials and it blow up.
If you have a yarn.lock
and don't want to delete it, you can temporarily do:
sed -i s/registry.yarnpkg.com/registry.npmjs.org/g yarn.lock
yarn
sed -i s/registry.npmjs.org/registry.yarnpkg.com/g yarn.lock
Quick comment to mention that we're aware of the issue, and trying to figure out a solution.
@isaacs The error page from Cloudflare mentions that cross-user CNAME are possible for Pro, Business, and Enterprise users through a support ticket. By any chance, is it something you could do?
npm's CTO is reaching out to CloudFlare about allowing the cross-user CNAME: tweet
We (aka npm) are in contact with Cloudflare to get this third-party CNAME allowed. I'll update this thread when I hear back.
https://status.yarnpkg.com should probably reflect registry is down.
Sorry for the delay in updating this. It's been updated to reflect this issue. This status is also shown on every page on the Yarn site.
Our CF rep says their SRE team is on it now-- should see a fix soon!
yarn add echarts
https://registry.yarnpkg.com/ is now hard down!
EDIT: I'm a jerk, the dependencies on the machine I'm testing must be cached. It still does not work on my CI
I'm in active conversation with Cloudflare about this; the fix is turning out to be more complicated than they expected because we're using edge workers. I'll continue to update here!
@codymikol is it? curl https://registry.yarnpkg.com/
times out
@miguelmota Cloudflare CNAME's aren't real CNAME's. CF sets A records and proxied traffic going through only acts as a CNAME.
Do you want to request a feature or report a bug?
Bug
What is the current behavior?
yarn add <anything>
returns 403, which makes sense because https://registry.yarnpkg.com shows an error from CloudFlare:This article suggests it's caused by a DNS misconfiguration?
What is the expected behavior?
Package successfully installs.
Please mention your node.js, yarn and operating system version.
node 8.9, yarn 1.6, macOS 10.13.4 (though I doubt any of that is relevant 🙂)