Skip to content

npm install gets stuck / hangs in reify:poly-fill-library #222

Description

@rollecode

Describe the bug
With the latest version the npm command gets stuck.

To Reproduce
Steps to reproduce the behavior:

  1. Get latest version
  2. Run prepare.php
  3. See it getting stuck

Expected behavior
The prepare script should be run through

Screenshots
It's been like this for 24 hours now (those duplicate lines are due pressing enter key):

image

Additional context
I'm sure this didn't happen before, but I don't know in which point it stopped working.

Node version: 20.10.0 (from the current package.json of wordpress-develop)
Ubuntu 20.04.6 LTS

Also see PR #221.

Activity

  1. rollecode commented on May 16, 2024

    @rollecode
    Author

    I have circumvented the issue by just commenting out the line with npm install npm build to get the PHP tests out.

    Not sure if the issue is with nvm, but reinstall or using other node versions won't work either.

    The full script I'm using:

    #!/bin/bash
    # Load nvm and test runner env variables
    source /home/wptestrunner/.nvm/nvm.sh
    source /var/www/wp-test-runner/.env
    
    # Get the correct node version from https://github.com/WordPress/wordpress-develop/blob/trunk/package.json engines section to a variable
    mkdir -p $HOME/wordpress-develop
    rm -f $HOME/wordpress-develop/package.json
    wget -qO- https://raw.githubusercontent.com/WordPress/wordpress-develop/trunk/package.json > $HOME/wordpress-develop/package.json
    WP_DEVELOP_NODE_VERSION=$(cat $HOME/wordpress-develop/package.json | grep -oP '(?<="node": ">=)(.*?)(?=")')
    nvm install $WP_DEVELOP_NODE_VERSION
    
    # Use the correct node version
    nvm use $WP_DEVELOP_NODE_VERSION
    
    # Make sure we are in the right place
    cd /var/www/wp-test-runner
    
    # Ensure we have the latest version
    git pull
    
    # Do complete cache clean
    npm cache clean --force
    
    # Do cleanup in case previous tests have failed
    php /var/www/wp-test-runner/cleanup.php
    
    # Prepare tests, bail if preparations fail
    if php /var/www/wp-test-runner/prepare.php | grep -q "Success: Prepared environment"; then
      echo "Success: Prepared environment"
    else
      echo ""
      exit
    fi
    
    # Actual tests do not have clear output to test against
    php /var/www/wp-test-runner/test.php
    
    # Send test results, bail upload does not succeed
    if php /var/www/wp-test-runner/report.php | grep -q "Results successfully uploaded"; then
      echo "Results successfully uploaded"
    else
      echo ""
      exit
    fi
    
    # Cleanup do not have clear output to test against
    php /var/www/wp-test-runner/cleanup.php
  2. pfefferle commented on Jun 13, 2024

    @pfefferle
    Member

    Can you try it with these changes? #225

  3. kittenkamala commented on May 14, 2025

    @kittenkamala
    Collaborator

    #225 was merged - ronilaukkarinen please update if the install still hangs or if resolved now (when you can). Thank you!!

  4. rollecode commented on May 15, 2025

    @rollecode
    Author

    Our script fetches always the latest version, so this seems to be fixed. Thanks!

    Tests: 25538, Assertions: 92051, Warnings: 86, Skipped: 27.
    Results successfully uploaded
    Environment variables pass checks.
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions