Skip to content
This repository has been archived by the owner on Aug 11, 2022. It is now read-only.

'npm install' hangs in update-notifier if stderr not a tty? #18759

Open
1 of 4 tasks
dankegel opened this issue Oct 8, 2017 · 1 comment
Open
1 of 4 tasks

'npm install' hangs in update-notifier if stderr not a tty? #18759

dankegel opened this issue Oct 8, 2017 · 1 comment
Labels

Comments

@dankegel
Copy link

dankegel commented Oct 8, 2017

I'm opening this issue because:

  • npm is crashing.
  • npm is producing an incorrect install.
  • npm is doing something I don't understand.
  • npm is hanging

What's going wrong?

'npm install' hangs at the end if stderr is a fifo because it depends on update-manager, which depends on an old version of boxen, which depends on an old version of term-size, which runs 'resize -u' without checking whether stderr is a tty.

This was discovered when a fleet of six macs, running npm 3.10.7 and 3.10.8, had one machine fail; the newly reinstalled machine ended up with npm 5.3.0, which exhibited the problem. Manually uninstalling node and npm, then doing 'brew install nodejs; npm install -g npm@3.10.8' works around the problem. On the affected machine, switching back to the newer npm brings back the hang reliably.

It's reproducible on the one osx 10.11.6 box, but not on others, so it's not clear how many users this will affect, if any, beyond me. I'm filing it for completeness, in case it's not just my box.

How can the CLI team reproduce the problem?

run 'npm install' in a foreground buildbot.net builder on osx 10.11, even with a trivial nearly empty project.json. I have attempted a trivial reproduction script (see https://github.com/dankegel/npm-install-hang-demo ); the script there hangs if run in my buildbot, but not if run from an ssh session :-(

supporting information:

  • npm -v prints: 5.3.0
  • node -v prints: v4.8.4 or v8.6.0
  • npm config get registry prints: https://registry.npmjs.org/
  • Windows, OS X/macOS, or Linux?: Mac OS 10.11.6
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants