Closed SpencerKaiser closed 1 year ago
Whether the package was installed from the binary or from homebrew made no difference
I don't understand what you mean by that, what binary, what package? Can you clarify please?
I was referring to corepack itself. Whether I installed node + core pack from their site via the installer, via the binary, or via home-brew the result was all the same.
To be honest, I was an idiot and had issues with my DNS but the errors thrown by corepack were still exceptionally unhelpful. If I understand how it works correctly, it seems it's calling out to the individual CLI's (like yarn
on demand unless they're already installed, so maybe this issue is better on that repo? Sorry for the mixed wires, I was grasping at straws when I wrote this haha
Just updated the details of the issue to better reflect what I found out; happy to move to their repo if you think that's the root cause
FYI when you say "installing the package via the binary", it's really unclear, IIUC you meant "installing node
+corepack
via the installer downloaded on nodejs.org" (because Homebrew also installs a binary, so it's confusing).
DNS issues are not very easy to detect for Corepack, it looks like any other network error, so I'm not quite sure how we could improve the present error message. Maybe you could share how you fixed the issue in case it's beneficial for someone that would encounter the same issue?
Sorry for the belated response, I was out of town 😬
IIUC you meant "installing node+corepack via the installer downloaded on nodejs.org"
Sorry about that, yes that's what I meant. I tried multiple variations of installing all the relevant dependencies, specifically where corepack
comes from
I'm not quite sure how we could improve the present error message. Maybe you could share how you fixed the issue in case it's beneficial for someone that would encounter the same issue?
I had NO idea that it was an issue with my DNS until I saw a random comment about how it might be a DNS error and suggested trying to curl
the relevant site to see if the result was retrievable by your DNS. Once I saw that, I was able to figure out that it was purely a DNS problem and my entire scope of debugging was DNS related (my router).
So maybe a comment with suggestion for debugging? E.g.,
Your connection appears to be offline. If you think this is a mistake, try `curl ...` to see if your DNS settings result in a resolvable host.
Your connection appears to be offline.
That's not really right, you would get the same result if the remote server were down, or for other proxy errors. That being said, adding the URL to the error message (or at least the stack trace) would be indeed an improvement. Would you like to contribute a PR?
Apologies; that was mostly a bad paraphrasing of the existing error. And sure thing on the contribution; I'll go open a PR now 😄
Done 👆
I recently had an update forced on my router which updated my DNS settings and for whatever reason it failed to resolve the host for the yarnpkg domain and, as a result, this error was thrown:
After like an hour of debugging I thought maybe it could be related to my credentials so I tried
yarn login
and after logging in all of the issues went away. However, later the issues came back andyarn login
was unable to resolve them... I think the first time I was having DNS issues but had yarn installed and the second time I think I was having the same issues but the installer itself couldn't be found.Any idea what might have caused this? I'm going to try and replicate but wanted to open this issue to help prevent others from going down the same rabbit hole I did.