Skip to content
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

Fix undefined error when package has no binaries #2969

Merged
merged 1 commit into from
Mar 27, 2017

Conversation

TimvdLippe
Copy link
Contributor

Summary

Today we installed a package which apparently didn't have any binary.
The console message however was: warning undefined has no binaries.
This happens because packageHasNoBinaries has 1 argument, which this call to the reporter does not serve.
Therefore the package name will be undefined.

Test plan

Given that the warning is not working properly (recursion, anyone? 😄 ), we suspect that the package was generator-polymer-init-custom-build.
Running yarn global add generator-polymer-init-custom-build shows the following output:

yarn global v0.21.3
warning No license field
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
warning undefined has no binaries
warning No license field
Done in 9.85s.

With this fix, the output is:

yarn global v0.23.0-0
warning No license field
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
warning "[email protected]" has no binaries
warning No license field
Done in 17.47s.

Today we installed a package which apparently didn't have any binary.
The console message however was: `warning undefined has no binaries`.
This happens because [`packageHasNoBinaries`](https://github.com/yarnpkg/yarn/blob/6e9a9a6596ca8f177f68f6672a1ef4ff16705336/src/reporters/lang/en.js#L252) has 1 argument, which this call to the reporter does not serve.
Therefore the package name will be undefined.
@arcanis arcanis merged commit 9b60b6e into yarnpkg:master Mar 27, 2017
@arcanis
Copy link
Member

arcanis commented Mar 27, 2017

Good catch 👌

@TimvdLippe TimvdLippe deleted the patch-1 branch March 27, 2017 13:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants