Skip to content

Commit 5bf7a7b

Browse files
authored
fix(build): Add 22.18.0 to affected nodeVersion in dereference symlink workaround (opennextjs#955)
* fix(build): Add 22.18.0 to affected nodeVersion in dereference symlink workaround * fix * review
1 parent 551dc85 commit 5bf7a7b

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

.changeset/nine-geese-lie.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@opennextjs/aws": patch
3+
---
4+
5+
fix(build): Add 22.18.0 to affected nodeVersion in dereference symlink workaround"

packages/open-next/src/build/installDeps.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ import type { InstallOptions } from "types/open-next";
77

88
import logger from "../logger.js";
99

10+
const AFFECTED_NODE_VERSIONS = ["22.17.0", "22.17.1", "22.18.0"];
11+
1012
export function installDependencies(
1113
outputDir: string,
1214
installOptions?: InstallOptions,
@@ -53,8 +55,8 @@ export function installDependencies(
5355

5456
// This is a workaround for Node `22.17.0` and `22.17.1`
5557
// https://github.com/nodejs/node/issues/59168
56-
const nodeVersion = process.version;
57-
if (nodeVersion === "v22.17.0" || nodeVersion === "v22.17.1") {
58+
const nodeVersion = process.versions.node;
59+
if (AFFECTED_NODE_VERSIONS.includes(nodeVersion)) {
5860
const tempBinDir = path.join(tempInstallDir, "node_modules", ".bin");
5961
const outputBinDir = path.join(outputDir, "node_modules", ".bin");
6062

0 commit comments

Comments
 (0)