From 4b509e20ac108fbc82762d948b2932b0c8cd788a Mon Sep 17 00:00:00 2001 From: Magnus Dahl Eide Date: Wed, 13 Aug 2025 11:06:42 +0200 Subject: [PATCH 1/3] fix(build): Add 22.18.0 to affected nodeVersion in dereference symlink workaround --- .changeset/nine-geese-lie.md | 5 +++++ packages/open-next/src/build/installDeps.ts | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 .changeset/nine-geese-lie.md diff --git a/.changeset/nine-geese-lie.md b/.changeset/nine-geese-lie.md new file mode 100644 index 000000000..eb01ad457 --- /dev/null +++ b/.changeset/nine-geese-lie.md @@ -0,0 +1,5 @@ +--- +"@opennextjs/aws": patch +--- + +fix(build): Add 22.18.0 to affected nodeVersion in dereference symlink workaround" diff --git a/packages/open-next/src/build/installDeps.ts b/packages/open-next/src/build/installDeps.ts index 40db056ed..ef5787b2e 100644 --- a/packages/open-next/src/build/installDeps.ts +++ b/packages/open-next/src/build/installDeps.ts @@ -7,6 +7,8 @@ import type { InstallOptions } from "types/open-next"; import logger from "../logger.js"; +const AFFECTED_NODE_VERSIONS = ["22.17.0", "22.17.1", "22.18.0"]; + export function installDependencies( outputDir: string, installOptions?: InstallOptions, @@ -54,7 +56,7 @@ export function installDependencies( // This is a workaround for Node `22.17.0` and `22.17.1` // https://github.com/nodejs/node/issues/59168 const nodeVersion = process.version; - if (nodeVersion === "v22.17.0" || nodeVersion === "v22.17.1") { + if (AFFECTED_NODE_VERSIONS.includes(nodeVersion)) { const tempBinDir = path.join(tempInstallDir, "node_modules", ".bin"); const outputBinDir = path.join(outputDir, "node_modules", ".bin"); From 7fcb00b6a92b75ecbf578d0866180ca13ef60f40 Mon Sep 17 00:00:00 2001 From: Magnus Dahl Eide Date: Wed, 13 Aug 2025 11:11:25 +0200 Subject: [PATCH 2/3] fix --- packages/open-next/src/build/installDeps.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/open-next/src/build/installDeps.ts b/packages/open-next/src/build/installDeps.ts index ef5787b2e..437d63d44 100644 --- a/packages/open-next/src/build/installDeps.ts +++ b/packages/open-next/src/build/installDeps.ts @@ -7,7 +7,7 @@ import type { InstallOptions } from "types/open-next"; import logger from "../logger.js"; -const AFFECTED_NODE_VERSIONS = ["22.17.0", "22.17.1", "22.18.0"]; +const AFFECTED_NODE_VERSIONS = ["v22.17.0", "v22.17.1", "v22.18.0"]; export function installDependencies( outputDir: string, From 80c26b80eb8be321f8c506aa384426361df2bfe0 Mon Sep 17 00:00:00 2001 From: Magnus Dahl Eide Date: Thu, 21 Aug 2025 11:46:51 +0200 Subject: [PATCH 3/3] review --- packages/open-next/src/build/installDeps.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/open-next/src/build/installDeps.ts b/packages/open-next/src/build/installDeps.ts index 437d63d44..06620d0fa 100644 --- a/packages/open-next/src/build/installDeps.ts +++ b/packages/open-next/src/build/installDeps.ts @@ -7,7 +7,7 @@ import type { InstallOptions } from "types/open-next"; import logger from "../logger.js"; -const AFFECTED_NODE_VERSIONS = ["v22.17.0", "v22.17.1", "v22.18.0"]; +const AFFECTED_NODE_VERSIONS = ["22.17.0", "22.17.1", "22.18.0"]; export function installDependencies( outputDir: string, @@ -55,7 +55,7 @@ export function installDependencies( // This is a workaround for Node `22.17.0` and `22.17.1` // https://github.com/nodejs/node/issues/59168 - const nodeVersion = process.version; + const nodeVersion = process.versions.node; if (AFFECTED_NODE_VERSIONS.includes(nodeVersion)) { const tempBinDir = path.join(tempInstallDir, "node_modules", ".bin"); const outputBinDir = path.join(outputDir, "node_modules", ".bin");