diff --git a/Dockerfile b/Dockerfile index 39db241f1..ca2035028 100644 --- a/Dockerfile +++ b/Dockerfile @@ -18,7 +18,7 @@ FROM ubuntu:22.04 as production ARG TIMEZONE=UTC ### UPDATE ### -RUN curl -sL https://deb.nodesource.com/setup_16.x | bash - +RUN curl -sL https://deb.nodesource.com/setup_20.x | bash - RUN apt update ### INSTALL APT-GET LIBS ### @@ -68,4 +68,4 @@ RUN mv wptagent.py wptagent_starter.py COPY wptagent_debug.py wptagent.py ### SETTING PRODUCTION BUILD AS DEFAULT ### -FROM production \ No newline at end of file +FROM production diff --git a/centos_install.sh b/centos_install.sh index 55c82c400..7b675b369 100755 --- a/centos_install.sh +++ b/centos_install.sh @@ -27,7 +27,7 @@ until python3 -m pip install --user -r .github/workflows/requirements.txt do sleep 1 done -curl --silent --location https://rpm.nodesource.com/setup_16.x | sudo bash - +curl --silent --location https://rpm.nodesource.com/setup_20.x | sudo bash - until sudo yum -y install nodejs do sleep 1 diff --git a/docs/install.md b/docs/install.md index fc9b758de..64e928d28 100644 --- a/docs/install.md +++ b/docs/install.md @@ -47,7 +47,7 @@ wptagent currently supports Windows, Linux and OSX for desktop browsers as well ## For lighthouse testing * NodeJS * Ubuntu/Debian: - * ```curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -``` + * ```curl -sL https://deb.nodesource.com/setup_20.x | sudo -E bash -``` * ```sudo apt-get install -y nodejs``` * The lighthouse npm module * ```sudo npm install -g lighthouse``` diff --git a/ubuntu_install.sh b/ubuntu_install.sh old mode 100755 new mode 100644 index e9c45c8ca..5be449ad7 --- a/ubuntu_install.sh +++ b/ubuntu_install.sh @@ -13,7 +13,7 @@ do done # Prepare Node for install -curl -sL https://deb.nodesource.com/setup_16.x | sudo -E bash - +curl -sL https://deb.nodesource.com/setup_20.x | sudo -E bash - # Install all of the binary dependencies echo ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true | sudo debconf-set-selections diff --git a/wptagent.py b/wptagent.py index d28bec0b5..69c6ad6ff 100644 --- a/wptagent.py +++ b/wptagent.py @@ -574,16 +574,16 @@ def startup(self, detected_browsers): except Exception: pass - # Check for Node 16+ - if self.get_node_version() < 16.0: + # Check for Node 18+ + if self.get_node_version() < 18.0: if platform.system() == "Linux": # This only works on debian-based systems - logging.debug('Updating Node.js to 16.x') + logging.debug('Updating Node.js to 20.x') subprocess.call('sudo apt -y install curl dirmngr apt-transport-https lsb-release ca-certificates', shell=True) - subprocess.call('curl -fsSL https://deb.nodesource.com/setup_16.x | sudo -E bash -', shell=True) + subprocess.call('curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -', shell=True) subprocess.call(['sudo', 'apt-get', 'install', '-y', 'nodejs']) - if self.get_node_version() < 16.0: - logging.warning("Node.js 16 or newer is required for Lighthouse testing") + if self.get_node_version() < 18.0: + logging.warning("Node.js 18 or newer is required for Lighthouse testing") # Force lighthouse 11.4.0 if self.get_lighthouse_version() != '11.4.0':