Closed
Description
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
Activity
bkad commentedon May 31, 2018
Getting the same error message, but maybe a different cause?
IlCallo commentedon May 31, 2018
Yeah, seems a different one. Mine seems to be triggered by the usage of Git Bash and its strange behaviour around the "/" character on Windows.
Today I noticed that now it doesn't install any package with a namespace, probably because it converts "/" to backslash for some obscure reasons...
Jasu commentedon Jun 4, 2018
This seems to happen randomly - if I run curl repeatedly, the following works around 10% of the time:
chiel commentedon Jun 6, 2018
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.
sgraham785 commentedon Jun 6, 2018
Having the same failure as @Jasu is seeing, which just started occurring today. Looks like it could have been cache that allowed it to work 10% of the time, but that seems to have been purged now and I have yet to download it.
seems that the referenced types package at
https://registry.npmjs.org/@types/node/-/node-9.4.2.tgz
is gone, even though it's still referenced in https://registry. yarnpkg.org/@types/node-> versions.9.4.2.dist.tarball
Anyone on the yarn team aware of why this is removed?
seems that node-9.6.0+ is available, however upgrading to yarn 1.7.0,
using node 10 it still tries to pull the node-9.4.3 types tarballhas no affect on this and is most likely from a dep (such as in my case)will try updating the types dep and report back
sgraham785 commentedon Jun 6, 2018
yep upgrading my @types/node dep to 9.6.0 worked. not ideal but worked.
i think it's important to mention that this is not a yarn only issue as I found the same issue using npm only and discovered that the @types/9.4.2 & 9.4.3 tarballs missing from the interwebs which could be something to do with removal of those packages by DefinitelyTyped or storage issue on npmjs.org, I wasn't able to find much other info regarding this issue which is why i am adding the context
anied commentedon Jun 12, 2018
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
.vinujosef commentedon Jun 13, 2018
@anied I also have the similar issue, but when I remove
yarn.lock
-> it shows "No lockfile found" and quits the process.Ranhiru commentedon Jun 20, 2018
After upgrading from Yarn 1.6.0 to 1.7.0 I just deleted the lock file and ran
yarn install
. Then myyarn add
commands started running again without any issuepeterlavey commentedon Sep 1, 2018
First
npm install
and then...
yarn
jamsheedpk commentedon Oct 16, 2018
Arguments:
/usr/local/bin/node /usr/bin/yarn add react-native-modelbox
PATH:
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin
Yarn version:
1.7.0
Node version:
10.4.1
Platform:
linux x64
Trace:
Error: https://registry.yarnpkg.com/react-native-modelbox: Not found
at Request.params.callback [as _callback] (/usr/lib/node_modules/yarn/lib/cli.js:65656:18)
at Request.self.callback (/usr/lib/node_modules/yarn/lib/cli.js:134675:22)
at Request.emit (events.js:182:13)
at Request. (/usr/lib/node_modules/yarn/lib/cli.js:135658:10)
at Request.emit (events.js:182:13)
at IncomingMessage. (/usr/lib/node_modules/yarn/lib/cli.js:135578:12)
at Object.onceWrapper (events.js:273:13)
at IncomingMessage.emit (events.js:187:15)
at endReadableNT (_stream_readable.js:1081:12)
at process._tickCallback (internal/process/next_tick.js:63:19)
jimklo commentedon May 2, 2019
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.jaapaurelio commentedon May 10, 2019
Had the same problem. I changed my
~/.npmrc
to addalways-auth = false
. It's working now.120 remaining items