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

browser-sync@2.22.0 package not installing #5131

Closed
romanmarkelov opened this issue Dec 28, 2017 · 16 comments
Closed

browser-sync@2.22.0 package not installing #5131

romanmarkelov opened this issue Dec 28, 2017 · 16 comments

Comments

@romanmarkelov
Copy link

romanmarkelov commented Dec 28, 2017

  • 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?
browser-sync@2.22.0 package not installing

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

@rally25rs
Copy link
Contributor

Unable to reproduce (yarn 1.3.2, osx sierra)

~/Projects/yarn-test 🐒   yarn add browser-sync@2.22.0
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.
├─ abbrev@1.1.1
├─ accepts@1.3.4
├─ after@0.8.2
├─ ajv@4.11.8
├─ ansi-regex@2.1.1
├─ ansi-styles@2.2.1
├─ anymatch@1.3.2
├─ aproba@1.2.0
├─ are-we-there-yet@1.1.4
├─ arr-diff@2.0.0
├─ arr-flatten@1.1.0
├─ array-unique@0.2.1
├─ arraybuffer.slice@0.0.6
├─ asn1@0.2.3
├─ assert-plus@1.0.0
├─ async-each-series@0.1.1
├─ async-each@1.0.1
├─ async-limiter@1.0.0
├─ async@1.5.2
├─ asynckit@0.4.0
├─ aws-sign2@0.6.0
├─ aws4@1.6.0
├─ backo2@1.0.2
├─ balanced-match@1.0.0
├─ base64-arraybuffer@0.1.5
├─ base64id@1.0.0
├─ batch@0.5.3
├─ bcrypt-pbkdf@1.0.1
├─ better-assert@1.0.2
├─ binary-extensions@1.11.0
├─ blob@0.0.4
├─ block-stream@0.0.9
├─ boom@2.10.1
├─ brace-expansion@1.1.8
├─ braces@1.8.5
├─ browser-sync-ui@1.0.1
├─ browser-sync@2.22.0
├─ bs-recipes@1.3.4
├─ builtin-modules@1.1.1
├─ callsite@1.0.0
├─ camelcase@3.0.0
├─ caseless@0.12.0
├─ chalk@1.1.3
├─ chokidar@1.7.0
├─ cliui@3.2.0
├─ co@4.6.0
├─ code-point-at@1.1.0
├─ combined-stream@1.0.5
├─ commander@2.12.2
├─ component-bind@1.0.0
├─ component-emitter@1.2.1
├─ component-inherit@0.0.3
├─ concat-map@0.0.1
├─ connect-history-api-fallback@1.5.0
├─ connect@3.5.0
├─ console-control-strings@1.1.0
├─ cookie@0.3.1
├─ core-util-is@1.0.2
├─ cryptiles@2.0.5
├─ dashdash@1.14.1
├─ debug@2.6.9
├─ decamelize@1.2.0
├─ deep-extend@0.4.2
├─ delayed-stream@1.0.0
├─ delegates@1.0.0
├─ depd@1.1.1
├─ destroy@1.0.4
├─ detect-libc@1.0.3
├─ dev-ip@1.0.1
├─ easy-extender@2.3.2
├─ eazy-logger@3.0.2
├─ ecc-jsbn@0.1.1
├─ ee-first@1.1.1
├─ emitter-steward@1.0.0
├─ encodeurl@1.0.1
├─ engine.io-client@3.1.4
├─ engine.io-parser@2.1.1
├─ engine.io@3.1.4
├─ error-ex@1.3.1
├─ escape-html@1.0.3
├─ escape-string-regexp@1.0.5
├─ etag@1.8.1
├─ eventemitter3@1.2.0
├─ expand-brackets@0.1.5
├─ expand-range@1.8.2
├─ extend@3.0.1
├─ extglob@0.3.2
├─ extsprintf@1.3.0
├─ filename-regex@2.0.1
├─ fill-range@2.2.3
├─ finalhandler@0.5.0
├─ find-up@1.1.2
├─ for-in@1.0.2
├─ for-own@0.1.5
├─ forever-agent@0.6.1
├─ form-data@2.1.4
├─ fresh@0.5.2
├─ fs-extra@3.0.1
├─ fs.realpath@1.0.0
├─ fsevents@1.1.3
├─ fstream-ignore@1.0.5
├─ fstream@1.0.11
├─ gauge@2.7.4
├─ get-caller-file@1.0.2
├─ getpass@0.1.7
├─ glob-base@0.3.0
├─ glob-parent@2.0.0
├─ glob@7.1.2
├─ graceful-fs@4.1.11
├─ har-schema@1.0.5
├─ har-validator@4.2.1
├─ has-ansi@2.0.0
├─ has-binary2@1.0.2
├─ has-cors@1.1.0
├─ has-unicode@2.0.1
├─ hawk@3.1.3
├─ hoek@2.16.3
├─ hosted-git-info@2.5.0
├─ http-errors@1.5.1
├─ http-proxy@1.15.2
├─ http-signature@1.1.1
├─ immutable@3.8.1
├─ indexof@0.0.1
├─ inflight@1.0.6
├─ inherits@2.0.3
├─ ini@1.3.5
├─ invert-kv@1.0.0
├─ is-arrayish@0.2.1
├─ is-binary-path@1.0.1
├─ is-buffer@1.1.6
├─ is-builtin-module@1.0.0
├─ is-dotfile@1.0.3
├─ is-equal-shallow@0.1.3
├─ is-extendable@0.1.1
├─ is-extglob@1.0.0
├─ is-fullwidth-code-point@1.0.0
├─ is-glob@2.0.1
├─ is-number-like@1.0.8
├─ is-number@2.1.0
├─ is-posix-bracket@0.1.1
├─ is-primitive@2.0.0
├─ is-typedarray@1.0.0
├─ is-utf8@0.2.1
├─ isarray@1.0.0
├─ isobject@2.1.0
├─ isstream@0.1.2
├─ jsbn@0.1.1
├─ json-schema@0.2.3
├─ json-stable-stringify@1.0.1
├─ json-stringify-safe@5.0.1
├─ jsonfile@3.0.1
├─ jsonify@0.0.0
├─ jsprim@1.4.1
├─ kind-of@3.2.2
├─ lcid@1.0.0
├─ limiter@1.1.2
├─ load-json-file@1.1.0
├─ localtunnel@1.8.3
├─ lodash.isfinite@3.3.2
├─ lodash@3.10.1
├─ micromatch@2.3.11
├─ mime-db@1.30.0
├─ mime-types@2.1.17
├─ mime@1.3.4
├─ minimatch@3.0.4
├─ minimist@0.0.8
├─ mkdirp@0.5.1
├─ ms@2.0.0
├─ nan@2.8.0
├─ negotiator@0.6.1
├─ node-pre-gyp@0.6.39
├─ nopt@4.0.1
├─ normalize-package-data@2.4.0
├─ normalize-path@2.1.1
├─ npmlog@4.1.2
├─ number-is-nan@1.0.1
├─ oauth-sign@0.8.2
├─ object-assign@4.1.1
├─ object-component@0.0.3
├─ object-path@0.9.2
├─ object.omit@2.0.1
├─ on-finished@2.3.0
├─ once@1.4.0
├─ openurl@1.1.1
├─ opn@4.0.2
├─ os-homedir@1.0.2
├─ os-locale@1.4.0
├─ os-tmpdir@1.0.2
├─ osenv@0.1.4
├─ parse-glob@3.0.4
├─ parse-json@2.2.0
├─ parseqs@0.0.5
├─ parseuri@0.0.5
├─ parseurl@1.3.2
├─ path-exists@2.1.0
├─ path-is-absolute@1.0.1
├─ path-type@1.1.0
├─ performance-now@0.2.0
├─ pify@2.3.0
├─ pinkie-promise@2.0.1
├─ pinkie@2.0.4
├─ portscanner@2.1.1
├─ preserve@0.2.0
├─ process-nextick-args@1.0.7
├─ punycode@1.4.1
├─ qs@6.2.1
├─ randomatic@1.1.7
├─ range-parser@1.2.0
├─ rc@1.2.2
├─ read-pkg-up@1.0.1
├─ read-pkg@1.1.0
├─ readable-stream@2.3.3
├─ readdirp@2.1.0
├─ regex-cache@0.4.4
├─ remove-trailing-separator@1.1.0
├─ repeat-element@1.1.2
├─ repeat-string@1.6.1
├─ request@2.81.0
├─ require-directory@2.1.1
├─ require-main-filename@1.0.1
├─ requires-port@1.0.0
├─ resp-modifier@6.0.2
├─ rimraf@2.6.2
├─ rx@4.1.0
├─ safe-buffer@5.1.1
├─ semver@5.4.1
├─ send@0.15.2
├─ serve-index@1.8.0
├─ serve-static@1.12.2
├─ server-destroy@1.0.1
├─ set-blocking@2.0.0
├─ set-immediate-shim@1.0.1
├─ setprototypeof@1.0.2
├─ signal-exit@3.0.2
├─ sntp@1.0.9
├─ socket.io-adapter@1.1.1
├─ socket.io-client@2.0.4
├─ socket.io-parser@3.1.2
├─ socket.io@2.0.4
├─ spdx-correct@1.0.2
├─ spdx-expression-parse@1.0.4
├─ spdx-license-ids@1.2.2
├─ sshpk@1.13.1
├─ statuses@1.3.1
├─ stream-throttle@0.1.3
├─ string_decoder@1.0.3
├─ string-width@1.0.2
├─ stringstream@0.0.5
├─ strip-ansi@3.0.1
├─ strip-bom@2.0.0
├─ strip-json-comments@2.0.1
├─ supports-color@2.0.0
├─ tar-pack@3.4.1
├─ tar@2.2.1
├─ tfunk@3.1.0
├─ to-array@0.1.4
├─ tough-cookie@2.3.3
├─ tunnel-agent@0.6.0
├─ tweetnacl@0.14.5
├─ ua-parser-js@0.7.12
├─ uid-number@0.0.6
├─ ultron@1.1.1
├─ universalify@0.1.1
├─ unpipe@1.0.0
├─ util-deprecate@1.0.2
├─ utils-merge@1.0.0
├─ uuid@3.1.0
├─ uws@0.14.5
├─ validate-npm-package-license@3.0.1
├─ verror@1.10.0
├─ which-module@1.0.0
├─ wide-align@1.1.2
├─ window-size@0.2.0
├─ wrap-ansi@2.1.0
├─ wrappy@1.0.2
├─ ws@3.3.3
├─ xmlhttprequest-ssl@1.5.4
├─ y18n@3.2.1
├─ yargs-parser@4.2.1
├─ yargs@6.4.0
└─ yeast@0.1.2
✨  Done in 17.99s.

What error are you getting?

@dmbdesignpdx
Copy link

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.

@romanmarkelov
Copy link
Author

romanmarkelov commented Dec 29, 2017

@rally25rs I have issue, installing browser-sync@2.22.0 never end.

yarn add browser-sync@2.22.0
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?

@rally25rs
Copy link
Contributor

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

@dmbdesignpdx
Copy link

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

@dmbdesignpdx
Copy link

dmbdesignpdx commented Dec 31, 2017

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.

@dmbdesignpdx
Copy link

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.

@oviava
Copy link

oviava commented Jan 19, 2018

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.

@dmbdesignpdx
Copy link

@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.

@garbinmarcelo
Copy link

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?

@dmbdesignpdx
Copy link

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

@rally25rs
Copy link
Contributor

rally25rs commented Feb 3, 2018

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

@dmbdesignpdx
Copy link

@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.

@rally25rs
Copy link
Contributor

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 😄

@Spongman
Copy link

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

@rally25rs
Copy link
Contributor

rally25rs commented Feb 24, 2018

@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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants