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

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

Open
ronilaukkarinen opened this issue May 16, 2024 · 2 comments
Open

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

ronilaukkarinen opened this issue May 16, 2024 · 2 comments
Labels

Comments

@ronilaukkarinen
Copy link

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.

@ronilaukkarinen
Copy link
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

@pfefferle
Copy link
Member

Can you try it with these changes? #225

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

No branches or pull requests

2 participants