-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TypeError: Reduce of empty array with no initial value #5876
Comments
Looks like this was introduced in #5663, stack trace leads to https://github.com/yarnpkg/yarn/blame/7f5947ffcee69bac4abbddaf718bce4acb559dd6/src/package-linker.js#L184 |
@spalger i can try to look into this tonight. |
I think I've found this issue and I'll have a PR up tonight. cc @bestander |
ping me when PR is ready |
Thanks @bestander and @bdwain! |
Any idea when this will land as a point release like 1.7.1 ? i just got bit by the link problem... |
Temporary workaround until patch release (works for me): remove node_modules, install without links, then add links back. rm -rf node_modules
yarn
yarn link myProject |
In the meantime, the nightly builds should already be available with this
fix.
https://yarnpkg.com/lang/en/docs/nightly/
…On Fri, May 25, 2018, 6:23 PM Kevin Cooper ***@***.***> wrote:
Temporary workaround until patch release (works for me): remove
node_modules, install without links, then add links back.
rm -rf node_modules
yarn
yarn link myProject
—
You are receiving this because you were assigned.
Reply to this email directly, view it on GitHub
<#5876 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AA_Wa3zGgfDOdB6_ZURgx3fJa29BhrCbks5t2D4fgaJpZM4UMrRP>
.
|
I already did this (on MacOS)
|
Because 1.7.0 has this problem: yarnpkg/yarn#5876
Many thanks to @nothingismagick for the workaround. I don't understand how a bug this serious made it into a release of mission-critical software like Yarn. |
Yeah, its kind of a weird situation. Over at https://github.com/quasarframework/quasar I have been championing Yarn - especially for our devs working on core. Being able to so effortlessly link (and not accidentally destroy the linked folder!!!) with yarn is a huge selling point. Telling them to downgrade makes me feel silly. :( |
By the way, there are several ways to "link", and the one I currently prefer is e.g.:
This way I don't have to run the link command in the quasar-cli folder and the target folder. This is nice when you need to have multiple versions and DON'T want a global link polluting your work. |
Oh, thanks, I didn't know about that. (We have almost entirely managed to stop using |
Perhaps Yarn shouldn't encourage people to upgrade to a new major version until it has been out a while? I only upgraded because Yarn suggested it. Now my projects are broken. Though, I'm sure this is a rare thing that such a big feature goes haywire and it gets released that way. |
Will there be a point release 1.7.1 or is 1.8.0 coming too soon? |
Yarn 1.8 has been released two weeks ago: https://github.com/yarnpkg/yarn/releases I'll move it to stable tomorrow since we haven't got critical reports yet, but you can already install it from various ways (for example with npm, |
According to https://yarnpkg.com/en/docs/install#mac-rc, 1.7.0 is still the release candidate. (It's also the stable version of course.) But yes, RC is 1.8.0 on NPM. |
This is kind of silly but it's working for me
|
@arcanis any update on moving yarn 1.8 to stable? |
Others recommended a yarn unlink PACKAGE
yarn
yarn link PACKAGE |
I cannot install last |
The version of Yarn from Choco is winning, which is why you are seeing 1.7.x. You’ll have to use Choco to uninstall Yarn. Then the NPM-installed version will be the one to execute.
Whoever maintains packages for Chico’s Yarn installer does not create an installer for release candidates. Just releases. So whenever v1.8.0 actually gets released, you can use Choco (pending an update from them) to install Yarn again.
It’s unfortunate that this is still an issue.
~Don
… On Jul 12, 2018, at 2:07 AM, Sviat Kuzhelev ***@***.***> wrote:
Cannot install last yarn 1.8.0 from choco install ***@***.*** or choco install ***@***.*** - error: package did not founded. Also if I try to make it throw npm install -g ***@***.*** I got installed yarn v.1.8.0, but really when I try yarn info or yarn versions - I see yarn v.1.7.0 in log. Miracle...
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
|
@arcanis thanks ! 👍 |
as a workaround you can do (on MacOS) until 1.8.0 lands in brew
|
@arcanis v1.7.0 is still listed as the stable version and v1.8.0 seems to have been taken off the RC list on https://yarnpkg.com/en/docs/install#windows-stable. Is there a window installer I can get for v1.8.0 somewhere? |
Due to a [bug in yarn 1.7.0](yarnpkg/yarn#5876) you can't use that version of Yarn Signed-off-by: Tyler Smalley <[email protected]>
The latest version of yarn is |
What is the current behavior? Installing dependencies fails with
error An unexpected error occurred: "Reduce of empty array with no initial value".
If the current behavior is a bug, please provide the steps to reproduce.
This is the simplest reproduction I've been able to create. The result should look something like this: https://github.com/spalger/reproduce-issues/tree/master/yarn-reduce-of-empty-array-without-initial-value
error log: https://github.com/spalger/reproduce-issues/blob/master/yarn-reduce-of-empty-array-without-initial-value/bar/yarn-error.log
yarn add
inbar
should fail.What is the expected behavior?
yarn add
should not fail with internal errorPlease mention your node.js, yarn and operating system version.
node -v
: v8.11.0yarn -v
: 1.7.0The text was updated successfully, but these errors were encountered: