Yarn: [email protected] package not installing

Created on 28 Dec 2017  ยท  16Comments  ยท  Source: yarnpkg/yarn

  • Browsersync [2.22.0]
  • Node [9.3.0]
  • Npm [5.6.0]
  • Yarn [1.3.2]
  • [10.12.6 ] OS X

What is the current behavior?
[email protected] package not installing

If the current behavior is a bug, please provide the steps to reproduce.
yarn add browser-sync

needs-confirmation triaged

Most helpful comment

I've been using node 8.5.0. Yarn doesn't officially support Yarn v9 yet (we don't run our CI tests against it).

At that point Yarn is just kicking off uws's install scripts using Node.js' child_process.spawn() and waiting for the shell command to finish. If it's hanging there, it's because the uws install script isn't ending, or Node isn't signaling Yarn that the process ended.

Does your output really have "Building fresh packages..." _twice_??? That... doesn't seem like it should happen ๐Ÿค”

If you run yarn install --ignore-scripts I bet it finishes fine, but it won't call uws's install script.


You know what, this all sounded familiar... I've been down this road before specifically with uws: #4946 @webmarkelov @dmbdesignpdx

All 16 comments

Unable to reproduce (yarn 1.3.2, osx sierra)

~/Projects/yarn-test ๐Ÿ’   yarn add [email protected]
yarn add v1.3.2
[1/4] ๐Ÿ”  Resolving packages...
[2/4] ๐Ÿšš  Fetching packages...
[3/4] ๐Ÿ”—  Linking dependencies...
[4/4] ๐Ÿ“ƒ  Building fresh packages...
success Saved lockfile.
success Saved 281 new dependencies.
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ”œโ”€ [email protected]
โ””โ”€ [email protected]
โœจ  Done in 17.99s.

What error are you getting?

This might be related (although my BrowserSync version is a littler older):

  • Node: 9.3.0
  • Yarn: 1.3.2
  • BrowserSync: 2.18.13
  • macOS: 10.13.2

Running:
yarn upgrade browser-sync

Results in:

[1/4] ๐Ÿ”  Resolving packages...
[2/4] ๐Ÿšš  Fetching packages...
[3/4] ๐Ÿ”—  Linking dependencies...
[4/4] ๐Ÿ“ƒ  Rebuilding all packages...
โ  
โ  
[1/2] โ ‚ fsevents
[1/2] โ   fsevents: node-pre-gyp http GET https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.1.3/fse-v1.1.3-node-v59-darwin-x64.tar
[-/2] โ ‚ waiting...
[-/2] โข€ waiting...
[2/2] โข€ uws
[-/2] โข€ waiting...
[-/2] โข€ waiting...
[4/4] ๐Ÿ“ƒ  Building fresh packages...
[-/2] โ ˆ waiting...
[2/2] โข€ uws
[-/2] โข€ waiting...
[-/2] โข€ waiting...
[-/2] โข€ waiting...

And it just sits there.

This does not happen when I upgrade any other package individually.

@rally25rs I have issue, installing [email protected] never end.

yarn add [email protected]
yarn add v1.3.2
info No lockfile found.
[1/4] ๐Ÿ”  Resolving packages...
[2/4] ๐Ÿšš  Fetching packages...
[3/4] ๐Ÿ”—  Linking dependencies...
[4/4] ๐Ÿ“ƒ  Building fresh packages...
โ 
โ 
[1/2] โ ‚ fsevents
[-/2] โ  waiting...
[2/2] โ  uws
[-/2] โ  waiting...
[-/2] โ  waiting...
[-/2] โ   waiting...
[-/2] โ  waiting...
[2/2] โ  uws
[-/2] โ  waiting...
[-/2] โ  waiting...
[4/4] ๐Ÿ“ƒ  Building fresh packages...
[-/8] โ  waiting...
[2/8] โ  uws
[-/8] โ  waiting...
[-/8] โ  waiting...
[-/8] โ  waiting...

@rally25rs, Do you run yarn with the node version latest?

I've been using node 8.5.0. Yarn doesn't officially support Yarn v9 yet (we don't run our CI tests against it).

At that point Yarn is just kicking off uws's install scripts using Node.js' child_process.spawn() and waiting for the shell command to finish. If it's hanging there, it's because the uws install script isn't ending, or Node isn't signaling Yarn that the process ended.

Does your output really have "Building fresh packages..." _twice_??? That... doesn't seem like it should happen ๐Ÿค”

If you run yarn install --ignore-scripts I bet it finishes fine, but it won't call uws's install script.


You know what, this all sounded familiar... I've been down this road before specifically with uws: #4946 @webmarkelov @dmbdesignpdx

@rally25rs
Confirmed: using the --ignore-scripts flag allowed it to finish. Thank you for the suggestion!

Well, after doing the following:

  • reverting to Node 8.9.3
  • uninstalling, reinstalling Yarn
  • removing node_modules
  • removing yarn.lock
  • clearing the package.json of dependencies

I began adding my dependencies back. All of the packages installed without a problem. I saved Browser-Sync for last...

yarn add -D browser-sync
yarn add v1.3.2
[1/4] ๐Ÿ”  Resolving packages...
[2/4] ๐Ÿšš  Fetching packages...
[3/4] ๐Ÿ”—  Linking dependencies...
[4/4] ๐Ÿ“ƒ  Building fresh packages...
โ  
โ  
[1/2] โ ‚ fsevents
[-/2] โ ˆ waiting...
[-/2] โข€ waiting...
[-/2] โ ˆ waiting...
[2/2] โ ˆ uws
[-/2] โ ˆ waiting...
[-/2] โ ˆ waiting...
[4/4] ๐Ÿ“ƒ  Building fresh packages...
[-/2] โ  waiting...
[2/2] โ  uws
[-/2] โ  waiting...
[-/2] โ  waiting...
[-/2] โ  waiting...

Could this be a Browser-Sync issue?
@webmarkelov I noticed you opened up an issue with Browser-Sync but no one has responded yet.

Update:
I can't add any new packages without this issue happening and it appears to revolve around Browser-Sync:

  • Removing Browser-Sync allows me to install new packages without a problem
  • Reverting to an older version of Browser-Sync (2.18.3) also allows me to install new packages without a problem

I will also post this update with Browser-Sync issue #1475.

Hi,

Having a perhaps similar issue, issue seems to have been with fsevents

My yarn install of gatsbyjs packages was stuck with:

node-pre-gyp http GET https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.1.3/fse-v1.1.3-node-v59-darwin-x64.tar.gz
node-pre-gyp http 200 https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.1.3/fse-v1.1.3-node-v59-darwin-x64.tar.gz

Before this you have a line something like:

node-pre-gyp info check checked for "<path-changed-for-privacy>/node_modules/fsevents/lib/binding/Release/node-v59-darwin-x64/fse.node"`

However the path was linking towards my home folder ~/.config/yarn/global/node_modules ..... After I want and deleted the node_modules folder from ~/.config/yarn/global everyhing is working again. And the info checked for line is checking in my project folder node_modules for fse.node. Not sure what that was ..

Seen a lot of issues with yarn and fsevents .. this fixed it for me.

P.S. I already tried yarn cache clean before and did nothing for me.

@oviava, thanks for your input. I first tried yarn cache clean which, also, didn't help. I then deleted the node_modules in the global folder and it still won't work.

Side note:
Creating a new directory, running yarn init, running yarn add -D browser-sync gets me stuck as usual. However, I did notice that browser-sync and its dependencies do get downloaded; but there is no yarn.lock.

Same error here...

I feel relieved, because I thought it was just me with that mistake! hahahaha

I tried to update Yarn, Node, disable firewall, delete files, install package by package, among others... however I continue with the same problem.

Config:
O.S.: Windows 10 x64
Yarn: 1.4.0
Node: 9.4.0

@dmbdesignpdx any news?

@marcelogarbin Nothing. Absolutely nothing. Not even acknowledgement of the issue on BrowserSync's side...

Based on the output that you guys reported, I'm pretty sure this is unrelated to BrowserSync, and an issue with uws's install script (see #4946 #3728 https://github.com/uNetworking/bindings/issues/31 ) โฌ…๏ธ that last one is my fav. It's pretty clear that the uws package owner doesn't care nor realizes that him explicitly calling node-gyp in his install script means he has a dependency on it. He instead criticizes node-gyp and says you don't need it. ๐Ÿ‘

I have 3 projects at work that usebrowsersync, and a 4th that uses uws and I've never seem a single one of them hang or fail to install locally on on Travis CI, so I've never been able to debug into it. I think I saw somewhere that it could be due to a version missmatch between node and node-gyp so reinstalling node-gyp might help ( npm install -g node-gyp ). Unfortunately the guy who published uws to npm just links to uWebSockets's github repo, which I don't think is actually who maintains the uws javascript package, ~so there doesn't seem to be anywhere to post an issue to them.~ IIRC the uws build script also logs its output to a file, so checking for that might provide some insight.

Oh after some hunting it looks like the uws package comes from here: https://github.com/uNetworking/bindings/tree/master/nodejs

@rally25rs confirmed: reinstalling node-gyp allowed the scripts to finish and upgraded browser-sync.

After reading through uNetworking/bindings#31 and face-palming at the end, I've seen this scenario come up again and again: unproductive conversations, especially coming from an owner, about an issue is toxic and doesn't help solve the issue. So, thank you for your help and productive input.

I'm going to go ahead and close this issue. Thanks for bearing with us on this one. There are a lot of moving parts so figuring out what's going wrong can be pretty tough sometimes ๐Ÿ˜„

i'm seeing the same problem. i don't think this is fixed.

@Spongman if you are still having a hang while yarn installs uws, please see my comment at the bottom of #4946 thanks!

_edit_

direct link to the comment

Was this page helpful?
0 / 5 - 0 ratings