diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b31d3548ad..0e7e8d2248 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -73,7 +73,7 @@ jobs: key: ${{ runner.OS }}-node-modules-${{ hashFiles('**/package-lock.json') }} - run: npm run build env: - NODE_OPTIONS: '--max-old-space-size=4096 --openssl-legacy-provider' + NODE_OPTIONS: '--max-old-space-size=4096' AWS_SDK_JS_SUPPRESS_MAINTENANCE_MODE_MESSAGE: 1 - name: Upload build files uses: actions/upload-artifact@v3 diff --git a/.github/workflows/playwright.yml b/.github/workflows/playwright.yml index 1f7bff5e34..726622a969 100644 --- a/.github/workflows/playwright.yml +++ b/.github/workflows/playwright.yml @@ -28,7 +28,7 @@ jobs: api-key: ${{ secrets.DD_API_KEY }} - name: Build env: - NODE_OPTIONS: --max-old-space-size=4096 --openssl-legacy-provider -r ${{ env.DD_TRACE_PACKAGE }} + NODE_OPTIONS: --max-old-space-size=4096 -r ${{ env.DD_TRACE_PACKAGE }} VITE_APP_FORMSG_SDK_MODE: 'test' run: npm run build - name: Run Playwright tests (login) diff --git a/Dockerfile.development b/Dockerfile.development index d19098cada..c500a159f6 100644 --- a/Dockerfile.development +++ b/Dockerfile.development @@ -8,15 +8,8 @@ RUN chown 1001:1001 /mongodb_data ENV CHROMIUM_BIN=/usr/bin/chromium-browser ENV NODE_ENV=development -# --openssl-legacy-provider flag -# A breaking change in the SSL provider was introduced in node 17. This caused -# webpack 4 to break. This is an interim solution; we should investigate removing -# this flag once angular has been removed and we have upgraded to CRA5 (which uses -# webpack 5). -# See also: -# * https://stackoverflow.com/questions/69692842/error-message-error0308010cdigital-envelope-routinesunsupported -# * https://github.com/webpack/webpack/issues/14532#issuecomment-1304378535 -ENV NODE_OPTIONS="--max-old-space-size=2048 --openssl-legacy-provider" + +ENV NODE_OPTIONS="--max-old-space-size=2048" RUN apk update && apk upgrade && \ # Build dependencies for node_modules apk add --virtual native-deps \ diff --git a/Dockerfile.production b/Dockerfile.production index aad1aab147..8a6fc98853 100644 --- a/Dockerfile.production +++ b/Dockerfile.production @@ -28,16 +28,8 @@ RUN npm ci --legacy-peer-deps COPY . ./ -# --openssl-legacy-provider flag -# A breaking change in the SSL provider was introduced in node 17. This caused -# webpack 4 to break. This is an interim solution; we should investigate removing -# this flag once angular has been removed and we have upgraded to CRA5 (which uses -# webpack 5). -# See also: -# * https://stackoverflow.com/questions/69692842/error-message-error0308010cdigital-envelope-routinesunsupported -# * https://github.com/webpack/webpack/issues/14532#issuecomment-1304378535 # These options are only used in the build stage, not the start stage. -ENV NODE_OPTIONS="--max-old-space-size=4096 --openssl-legacy-provider" +ENV NODE_OPTIONS="--max-old-space-size=4096" RUN npm run build diff --git a/README.md b/README.md index b3b9d879d6..7cb8ac3556 100755 --- a/README.md +++ b/README.md @@ -85,12 +85,6 @@ To install the relevant npm packages (frontend, backend and virus-scanner), run npm install && npm --prefix serverless/virus-scanner install ``` -To prevent breaking changes to webpack4 introduced in node 17 and above, enable the `--openssl-legacy-provider` flag: - -```bash -export NODE_OPTIONS=--openssl-legacy-provider -``` - If you are on Mac OS X, you may want to allow Docker to use more RAM (minimum of 4GB) by clicking on the Docker icon on the toolbar, clicking on the "Preferences" menu item, then clicking on the "Resources" link on the left. ### Running Locally