statusboard icon indicating copy to clipboard operation
statusboard copied to clipboard

docs: Document exit handler not called in resource constrained environments

Open lukekarrys opened this issue 4 years ago • 5 comments
trafficstars

Projects with dep graphs the size of create-react-app tend to have a high number of Exit/cb() handler not called when run on resource constrained environments such as phones. We should create a wiki document to point people to when encountering this with steps to troubleshoot. It would also be nice to have some concrete benchmarks run in resource constrained docker containers to know the prevalence of these issues.

  • [ ] Create resource constrained docker benchmarks
  • [ ] Create wiki page documenting issue/workarounds

List of issues with possible culprits:

  • Termux: https://github.com/npm/cli/issues/3801
  • Possible proxy issue: https://github.com/npm/cli/issues/3577#issuecomment-887410356
  • Docker: https://github.com/npm/cli/issues/3663

lukekarrys avatar Sep 23 '21 16:09 lukekarrys

Looks to me that npm 7 doesn't allow longer awaiting for packages to finish downloading. On npm 6 it works just fine. Would be better to just throw a warning about slow connection or something instead of breaking whole process with an error.

SharakPL avatar Sep 29 '21 10:09 SharakPL

Its also a bad practice to have one vague error message that could be caused multiple unique factors And how sure is it its that one problem that cause the error? npm 6 works just fine... I guess I will use npm 6 until it dies out...

truboxl avatar Oct 10 '21 11:10 truboxl

npm 8 is out and this bug still there. I wonder how long I'll be forced to stick with npm 6 because of some kind of timeout error.

rodrigogs avatar Nov 16 '21 05:11 rodrigogs

PSA: This is a catch-all error that can occur when any of the preinstall scripts fail. Use --foreground-scripts flag while running the install command or set it in config.

This will reveal the actual error causing the failure.

Starting from npm v7 all lifecycle scripts are run in the background, effectively suppressing any error messages. Using this flag allows you to see the script output.

On failure of a lifecycle script, npm should probably log the output which it currently ignores.

vishalbiswas avatar Dec 31 '21 03:12 vishalbiswas

Would like to join this list by mentioning that on my host, all-inkl, where I have a shared hosting package, this error happens, too. If I am in the wrong thread, would someone please advise me to the proper location? Thank you! :-)

npm-install-problem

rowild avatar Mar 15 '23 09:03 rowild