From 08e6bc6c27838007e9d3976ebd4ce6b964405192 Mon Sep 17 00:00:00 2001 From: Alicia Sykes Date: Mon, 4 Mar 2024 13:47:15 +0000 Subject: [PATCH] =?UTF-8?q?=E2=9A=A1=20Update=20Node=20version=20for=20Net?= =?UTF-8?q?lify=20deployments?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .npmrc | 1 - Dockerfile | 2 +- netlify.toml | 2 +- package.json | 2 +- 4 files changed, 3 insertions(+), 4 deletions(-) delete mode 100644 .npmrc diff --git a/.npmrc b/.npmrc deleted file mode 100644 index 2b008da6..00000000 --- a/.npmrc +++ /dev/null @@ -1 +0,0 @@ -node-options="--openssl-legacy-provider" diff --git a/Dockerfile b/Dockerfile index 1722d11f..f04224f9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -22,7 +22,7 @@ RUN yarn install --ignore-engines --immutable --no-cache --network-timeout 30000 COPY . ./ # Build initial app for production -RUN NODE_OPTIONS=--openssl-legacy-provider yarn build --mode production +RUN yarn build --mode production # Production stage FROM node:20.11.1-alpine3.19 diff --git a/netlify.toml b/netlify.toml index 4cbae19d..73d23e8e 100644 --- a/netlify.toml +++ b/netlify.toml @@ -8,7 +8,7 @@ command = "yarn build" publish = "dist" functions = "services/serverless-functions" - environment = { NODE_VERSION = "16.13.2" } + environment = { NODE_VERSION = "20.11.1", NODE_OPTIONS = "--openssl-legacy-provider" } # Site info, used for the 1-Click deploy page [template.environment] diff --git a/package.json b/package.json index 96af62f5..8e4f144a 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "scripts": { "start": "node server", "dev": "vue-cli-service serve", - "build": "vue-cli-service build", + "build": "NODE_OPTIONS=--openssl-legacy-provider vue-cli-service build", "lint": "vue-cli-service lint", "pm2-start": "npx pm2 start server.js", "build-watch": "vue-cli-service build --watch --mode production",