Skip to content

Commit 410f4dd

Browse files
committed
Fix infinite loop in build script by using npx next build directly
1 parent f2255d9 commit 410f4dd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

build-static.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ try {
1515
console.log("✅ Temporarily moved API routes");
1616
}
1717

18-
// Run the build
18+
// Run the Next.js build directly (not npm run build to avoid infinite loop)
1919
console.log("🔨 Running Next.js build...");
20-
execSync("npm run build", { stdio: "inherit" });
20+
execSync("npx next build", { stdio: "inherit" });
2121

2222
// Move API directory back
2323
if (fs.existsSync(tempApiDir)) {

0 commit comments

Comments
 (0)