Skip to content

Conversation

@promer94
Copy link
Collaborator

based on #4185 #4184

@vercel
Copy link

vercel bot commented Nov 28, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
swr Error Error Nov 28, 2025 7:59am

@codesandbox-ci
Copy link

codesandbox-ci bot commented Nov 28, 2025

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

@socket-security
Copy link

socket-security bot commented Nov 28, 2025

Copy link

@vercel vercel bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔧 Build Fix:

The repository was missing a vercel.json configuration file, causing Vercel to use project-level settings that specified a non-existent "docs" root directory. The configuration file now explicitly specifies the build command and output directory for the Next.js site deployment.

View Details
📝 Patch Details
diff --git a/e2e/site/next-env.d.ts b/e2e/site/next-env.d.ts
index 3cd7048..2d5420e 100644
--- a/e2e/site/next-env.d.ts
+++ b/e2e/site/next-env.d.ts
@@ -1,6 +1,7 @@
 /// <reference types="next" />
 /// <reference types="next/image-types/global" />
 /// <reference types="next/navigation-types/compat/navigation" />
+import "./.next/types/routes.d.ts";
 
 // NOTE: This file should not be edited
 // see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
diff --git a/e2e/site/tsconfig.json b/e2e/site/tsconfig.json
index ebd7bfc..60f80ca 100644
--- a/e2e/site/tsconfig.json
+++ b/e2e/site/tsconfig.json
@@ -1,7 +1,11 @@
 {
   "compilerOptions": {
     "target": "es5",
-    "lib": ["dom", "dom.iterable", "esnext"],
+    "lib": [
+      "dom",
+      "dom.iterable",
+      "esnext"
+    ],
     "allowJs": true,
     "skipLibCheck": true,
     "strict": true,
@@ -12,7 +16,7 @@
     "moduleResolution": "node",
     "resolveJsonModule": true,
     "isolatedModules": true,
-    "jsx": "preserve",
+    "jsx": "react-jsx",
     "incremental": true,
     "plugins": [
       {
@@ -21,9 +25,19 @@
     ],
     "baseUrl": ".",
     "paths": {
-      "~/*": ["./*"]
+      "~/*": [
+        "./*"
+      ]
     }
   },
-  "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
-  "exclude": ["node_modules"]
+  "include": [
+    "next-env.d.ts",
+    "**/*.ts",
+    "**/*.tsx",
+    ".next/types/**/*.ts",
+    ".next/dev/types/**/*.ts"
+  ],
+  "exclude": [
+    "node_modules"
+  ]
 }
diff --git a/vercel.json b/vercel.json
new file mode 100644
index 0000000..56ec7f7
--- /dev/null
+++ b/vercel.json
@@ -0,0 +1,4 @@
+{
+  "buildCommand": "pnpm build && pnpm build:e2e",
+  "outputDirectory": "e2e/site/.next"
+}

Analysis

Missing Vercel configuration causes root directory error

What fails: Vercel deployment fails during build initialization with error "The specified Root Directory 'docs' does not exist"

How to reproduce: Vercel project settings were configured to use "docs" as the root directory, but the directory does not exist in the repository.

Result:

The specified Root Directory "docs" does not exist. Please update your Project Settings.

Fix: Create vercel.json configuration file that explicitly specifies the correct build command and output directory for the Next.js site in the e2e/site subdirectory. This overrides the project-level Vercel settings that were pointing to a non-existent "docs" directory.

Fix on Vercel

@promer94 promer94 changed the title deps: upgrade other dev deps except jest deps: upgrade other dev deps except jest and react Nov 28, 2025
Copy link

@vercel vercel bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔧 Build Fix:

The Vercel project dashboard is misconfigured with a root directory of "docs" that doesn't exist in the repository. The vercel.json configuration file explicitly specifies the build command and output directory to override this dashboard setting, allowing the build to proceed from the repository root.

View Details
📝 Patch Details
diff --git a/vercel.json b/vercel.json
new file mode 100644
index 0000000..5b526d2
--- /dev/null
+++ b/vercel.json
@@ -0,0 +1,4 @@
+{
+  "buildCommand": "pnpm build",
+  "outputDirectory": "dist"
+}

Analysis

Vercel build fails due to misconfigured root directory

What fails: Vercel build fails immediately after cloning the repository because the project dashboard specifies a root directory of "docs" which does not exist in the repository.

How to reproduce: When Vercel attempts to build a project with the SWR repository (github.com/vercel/swr) and the project dashboard has "docs" configured as the root directory, the build fails immediately with:

The specified Root Directory "docs" does not exist. Please update your Project Settings.

Result: The build cannot proceed past the initialization phase.

Fix: Created vercel.json configuration file that explicitly specifies the build command and output directory, which overrides the dashboard root directory setting and allows the build to proceed from the repository root.

Fix on Vercel

@huozhi huozhi changed the title deps: upgrade other dev deps except jest and react deps: upgrade dev deps for build Nov 28, 2025
@huozhi huozhi merged commit c7eda39 into main Nov 28, 2025
6 checks passed
@huozhi huozhi deleted the dep/dev-deps branch November 28, 2025 21:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants