node-gradle / node-gradle/gradle-node-plugin

npmInstall hangs indefinitely with no output when running on docker under WSL2 debian

Open
#161 4 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Groovy
Stars
677
Forks
120
PR merge metrics
No merged PRs in 30d

Description

Please help! I'm at my wits' end trying to make this build work.

I have provided a small sample project that reproduces the issue.

Environment:
WSL2 on Windows 10 x64, with the Debian distro; Docker Desktop configured for WSL2
Docker version 20.10.5, build 55c4c88
Executed in Windows Terminal (Debian): https://www.microsoft.com/en-us/p/windows-terminal/9n0dx20hk701?activetab=pivot:overviewtab

Steps to reproduce:

  1. Clone the sample project:
    https://github.com/rmorrise/test-node-gradle
    This is an empty Angular project in a gradle submodule.

  2. Execute the batch file:
    ./runme.sh

Expected results:

Part one: npm install succeeds when running inside the docker container (this takes less than 2 minutes)
Part two: gradlew clean succeeds when running in the container
Part three: npmInstall task succeeds when running in the container, and verbose logging is displayed

Actual results:

Part one and two succeed
Part three: npmInstall task hangs indefinitely (over an hour) with no output except the following:

This hangs with no output after starting npmInstall task v v v v v
Downloading https://services.gradle.org/distributions/gradle-6.7.1-bin.zip
.........10%..........20%..........30%..........40%..........50%.........60%..........70%..........80%..........90%..........100%

Welcome to Gradle 6.7.1!

Here are the highlights of this release:
 - File system watching is ready for production use
 - Declare the version of Java your build requires
 - Java 15 support

For more details see https://docs.gradle.org/6.7.1/release-notes.html

Starting a Gradle Daemon (subsequent builds will be faster)

> Task :test-ui:clean UP-TO-DATE
> Task :test-ui:nodeSetup SKIPPED
> Task :test-ui:npmSetup SKIPPED
> Task :test-ui:npmInstall

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by running ./runme.sh in the linked sample project under WSL2/Docker and compare the standalone npm install with the test-ui:npmInstall task. Read the plugin entry points and task configuration for npmInstall, then use the provided Gradle 6.7.1 output to trace where execution stops. Done means the task completes without hanging and provides the expected output in this environment.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, groovy, nodejs
Domain
build-system, devops
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.