diff --git a/.docker/gitlab.Dockerfile b/.docker/gitlab.Dockerfile index 7fcdcc9e4..66b781e2f 100644 --- a/.docker/gitlab.Dockerfile +++ b/.docker/gitlab.Dockerfile @@ -4,7 +4,7 @@ WORKDIR /var/www ENV DEBIAN_FRONTEND noninteractive ENV PHP_VER=8.2 -ENV NODE_VERSION=16 +ENV NODE_VERSION=20 # Software package layer # Nodesource setup comes after yarnpkg because it runs `apt-get update` diff --git a/Dockerfile b/Dockerfile index e0c338ad2..af5bc4c9e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,7 +3,7 @@ FROM debian:bullseye-slim ENV DEB_RELEASE bullseye ENV DEBIAN_FRONTEND noninteractive ENV PHP_VER 8.2 -ENV NODE_VERSION 16 +ENV NODE_VERSION 20 WORKDIR /var/www diff --git a/README.md b/README.md index 00ae0275a..fc54fa215 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ needs. Gazelle is written in PHP, Twig, JavaScript, and MySQL. ## Gazelle Runtime Dependencies * [PHP 8.2.6+](https://www.php.net/) (required) * [Nginx](http://wiki.nginx.org/Main) (required) -* [NodeJS 12+](https://nodejs.org/en/) (required) +* [NodeJS 20+](https://nodejs.org/en/) (required) * [Memcached](http://memcached.org/) (required) * [Sphinx 2.2 or newer](http://sphinxsearch.com/) (required) * [ocelot](https://github.com/OPSnet/Ocelot) (optional) diff --git a/webpack.mix.js b/webpack.mix.js index 6832060cd..1bff54928 100644 --- a/webpack.mix.js +++ b/webpack.mix.js @@ -1,4 +1,10 @@ -let mix = require('laravel-mix'); +const crypto = require('node:crypto'); +const mix = require('laravel-mix'); + +// TODO: shim to override md4 with a supported crypto algorithm that does not crash out node, until +// we upgrade to a newer version of webpack that defaults to using sha256. +const crypto_orig_createHash = crypto.createHash; +crypto.createHash = (algorithm) => crypto_orig_createHash(algorithm == "md4" ? "sha256" : algorithm); let sassopts = { sassOptions: {