Do you want to request a feature or report a bug?
Bug
What is the current behavior?
I cannot install some packages globally when in Windows and using Git Bash.
For example, for @nrwl/schematics
(but also for @angular/cli
) I get
$ yarn global add @nrwl/schematics
yarn global v1.7.0
[1/4] Resolving packages...
error An unexpected error occurred: "https://https://registry.yarnpkg.com/@nrwl/schematics: Not found".
Error log:
Error: https://registry.yarnpkg.com/@nrwl/schematics: Not found
at Request.params.callback [as _callback] (C:\Program Files (x86)\Yarn\lib\cli.js:65656:18)
at Request.self.callback (C:\Program Files (x86)\Yarn\lib\cli.js:134675:22)
at Request.emit (events.js:159:13)
at Request.<anonymous> (C:\Program Files (x86)\Yarn\lib\cli.js:135658:10)
at Request.emit (events.js:159:13)
at IncomingMessage.<anonymous> (C:\Program Files (x86)\Yarn\lib\cli.js:135578:12)
at Object.onceWrapper (events.js:254:19)
at IncomingMessage.emit (events.js:164:20)
at endReadableNT (_stream_readable.js:1062:12)
at process._tickCallback (internal/process/next_tick.js:152:19)
In Ubuntu it seems to work just fine.
Same if I use the Windows PowerShell instead of Git Bash.
If the current behavior is a bug, please provide the steps to reproduce.
See above
What is the expected behavior?
That packages are installed
Please mention your node.js, yarn and operating system version.
$ node -v
v9.3.0
$ yarn config list
yarn config v1.7.0
info yarn config
{ 'version-tag-prefix': 'v',
'version-git-tag': true,
'version-commit-hooks': true,
'version-git-sign': false,
'version-git-message': 'v%%s',
'init-version': '1.0.0',
'init-license': 'MIT',
'save-prefix': '^',
'bin-links': true,
'ignore-scripts': false,
'ignore-optional': false,
registry: 'https://registry.yarnpkg.com',
'strict-ssl': true,
'user-agent': 'yarn/1.7.0 npm/? node/v9.3.0 win32 x64',
lastUpdateCheck: 1527149439512 }
info npm config
{}
Windows 10
This seems to happen randomly – if I run curl repeatedly, the following works around 10%% of the time:
Getting the same issue during our CI build, always fails on the same url @Jasu posted. Indeed it seems to happen randomly so I don’t think changing yarn client version or anything will happen. Almost seems like there’s a caching layer in place that has cached a 404 on some of its nodes or something.
Hey all, heads up– Had this same issue on mac and was able to resolve this with the following steps:
node_modules
yarn.lock
yarn install
And everything worked/installed as expected.
My hunch is that the salient step is the removal of
yarn.lock
.First
npm install
and then…
yarn
Similar issue:
yarn-error.log
Curl can download the package without any problems.
Cannot seem to figure out how to even work around this.edit: I determined the problem… this is certainly terrible error messaging by yarn or npm (not sure if yarn reimplements npm’s features or not). Turns out in my instance, I had some bad authentication credentials in my
~/.npmrc
, that once removed, allowed scoped packages to download again. I’m still a bit confused by my observation to why this was only a problem for some packages, specifically scoped packages.Running the below command in terminal fixed my issue:
yarn config set strict-ssl false
Hiya, for me it was causing problems due to my strict secure corporate network. It just allowed me to bypass that. I’d just make sure you know what packages you’re installing first, and then flip it back to true afterwards. But I’m far from an expert in this, so if anyone has any insights as to any possible dangers here, I’d love to read about them. Cheers everyone.
Our builds have been failing intermittently with this same error for the last couple of days. The first failure we noticed was at 2019-09-30T00:01 UTC.
The failures are happening fairly frequently (but not every time, more like 80-90%% of the time). It’s always the same error, but for 4 different packages so far:
Each of these packages is public, and each version that’s failing is the latest one published, so upgrading to a newer version isn’t an option. Doing a
curl
request directly from one of the build machines returns a200 OK
response.The various suggestions above (and in many other issues) to delete
yarn.lock
and re-install the modules aren’t going to work, because that completely defeats the point of using a lockfile in the first place. Doing so will upgrade every single transitive dependency, instead of actually fixing what is clearly an intermittent problem with the registry itself.Oddly enough, I just needed to restart my computer. The good ol’ turn it off and on again. I tried several different things including the above solutions, but restarting did the trick.
I just delete the yarn.lock file and try yarn add again, It worked !
All working 😀
Thank you npm 🙂

Working fine now!
worked for me
run
yarn config set registry https://registry.npmjs.org
will do the job
Doesn’t work for me
More info:
This error happen not only in macOS, but in Linux (Ubuntu, CentOS) too.
In my case, this error was related to some misfunction in docker, probably after some change on iptables rules.
After restart docker service, everything works fine for me.
$ sudo systemctl restart docker