Skip to content

fix: add apps/docs/vercel.json to fix docs deployment build failure#243

Merged
hotlong merged 2 commits intomainfrom
copilot/upgrade-objectstack-to-latest-another-one
Feb 27, 2026
Merged

fix: add apps/docs/vercel.json to fix docs deployment build failure#243
hotlong merged 2 commits intomainfrom
copilot/upgrade-objectstack-to-latest-another-one

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Feb 27, 2026

Description

Vercel docs project (Root Directory = apps/docs) was inheriting the root vercel.json, causing the build command to resolve scripts/patch-console-plugin.cjs relative to apps/docs/ where it doesn't exist.

Error: Cannot find module '/vercel/path0/apps/docs/scripts/patch-console-plugin.cjs'

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Code refactoring
  • Performance improvement
  • CI/CD update

Related Issues

Related to #242

Changes Made

  • Added apps/docs/vercel.json to override the root config for the docs Vercel project
  • Docs config specifies only installCommand; framework auto-detection handles next build
  • Root vercel.json (API server config with functions, rewrites, patch-console-plugin) remains unchanged

Testing

  • Unit tests pass (npm test)
  • Linting passes (npm run lint)
  • Build succeeds (npm run build)
  • Manual testing completed
  • New tests added (if applicable)

195 test files, 3817 tests passing. Docs next build generates all 282 static pages successfully.

Screenshots

N/A

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published

Additional Notes

The root vercel.json is for the API server deployment (Root Directory = /). Per Vercel docs, when a project's Root Directory is a subdirectory, a vercel.json placed there takes precedence over the repo root one. Without this file, the docs project was picking up the API build pipeline.

Original prompt

03:18:50.804 Running build in Washington, D.C., USA (East) – iad1
03:18:50.804 Build machine configuration: 4 cores, 8 GB
03:18:50.923 Cloning github.com/objectstack-ai/hotcrm (Branch: copilot/upgrade-objectstack-to-latest-again, Commit: 954fb95)
03:18:52.798 Cloning completed: 1.874s
03:18:53.115 Restored build cache from previous deployment (4h4o3haaKVnN8mCmejuHuzit5HrH)
03:18:56.138 Running "vercel build"
03:18:56.710 Vercel CLI 50.23.2
03:18:57.942 Detected pnpm-lock.yaml 9 which may be generated by pnpm@9.x or pnpm@10.x
03:18:57.943 Using pnpm@10.x based on project creation date
03:18:57.943 To use pnpm@9.x, manually opt in using corepack (https://vercel.com/docs/deployments/configure-a-build#corepack)
03:18:57.943 Running "install" command: pnpm install --ignore-scripts...
03:18:58.555 Scope: all 17 workspace projects
03:19:02.508 ../.. | +720 ++++++++++++++++++++++++++++++++
03:19:02.609  WARN  Failed to create bin at /vercel/path0/apps/docs/node_modules/.bin/node. ENOENT: no such file or directory, chmod '/vercel/path0/apps/docs/node_modules/@types/node/bin/node'
03:19:02.713 ../.. | Progress: resolved 0, reused 0, downloaded 1, added 0
03:19:03.715 ../.. | Progress: resolved 0, reused 0, downloaded 28, added 8
03:19:04.716 ../.. | Progress: resolved 0, reused 0, downloaded 162, added 76
03:19:05.717 ../.. | Progress: resolved 0, reused 0, downloaded 227, added 93
03:19:06.738 ../.. | Progress: resolved 0, reused 0, downloaded 354, added 173
03:19:07.738 ../.. | Progress: resolved 0, reused 0, downloaded 381, added 185
03:19:08.740 ../.. | Progress: resolved 0, reused 0, downloaded 488, added 261
03:19:09.741 ../.. | Progress: resolved 0, reused 0, downloaded 668, added 382
03:19:10.741 ../.. | Progress: resolved 0, reused 0, downloaded 705, added 510
03:19:11.743 ../.. | Progress: resolved 0, reused 0, downloaded 705, added 569
03:19:12.743 ../.. | Progress: resolved 0, reused 0, downloaded 705, added 718
03:19:13.366 ../.. | Progress: resolved 0, reused 0, downloaded 705, added 720, done
03:19:13.461  WARN  Failed to create bin at /vercel/path0/apps/docs/node_modules/.bin/node. ENOENT: no such file or directory, chmod '/vercel/path0/apps/docs/node_modules/@types/node/bin/node'
03:19:13.536
03:19:13.549 Done in 15.4s using pnpm v10.28.0
03:19:13.719 node:internal/modules/cjs/loader:1424
03:19:13.720 throw err;
03:19:13.720 ^
03:19:13.720
03:19:13.720 Error: Cannot find module '/vercel/path0/apps/docs/scripts/patch-console-plugin.cjs'
03:19:13.720 at Module._resolveFilename (node:internal/modules/cjs/loader:1421:15)
03:19:13.720 at defaultResolveImpl (node:internal/modules/cjs/loader:1059:19)
03:19:13.720 at resolveForCJSWithHooks (node:internal/modules/cjs/loader:1064:22)
03:19:13.720 at Module._load (node:internal/modules/cjs/loader:1227:37)
03:19:13.720 at TracingChannel.traceSync (node:diagnostics_channel:328:14)
03:19:13.720 at wrapModuleLoad (node:internal/modules/cjs/loader:245:24)
03:19:13.720 at Module.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:154:5)
03:19:13.721 at node:internal/main/run_main_module:33:47 {
03:19:13.721 code: 'MODULE_NOT_FOUND',
03:19:13.721 requireStack: []
03:19:13.721 }
03:19:13.721
03:19:13.721 Node.js v24.13.0
03:19:13.727 Error: Command "node scripts/patch-console-plugin.cjs && pnpm --filter @hotcrm/core build && pnpm --filter @hotcrm/ai --filter @hotcrm/crm --filter @hotcrm/finance --filter @hotcrm/marketing --filter @hotcrm/products --filter @hotcrm/support --filter @hotcrm/hr build" exited with 1


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

@vercel
Copy link
Copy Markdown

vercel Bot commented Feb 27, 2026

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

Project Deployment Actions Updated (UTC)
hotcrm Error Error Feb 27, 2026 3:47am
hotcrm-demo Error Error Feb 27, 2026 3:47am

Request Review

Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
Copilot AI changed the title [WIP] Upgrade ObjectStack to latest version fix: add apps/docs/vercel.json to fix docs deployment build failure Feb 27, 2026
@hotlong hotlong marked this pull request as ready for review February 27, 2026 03:56
Copilot AI review requested due to automatic review settings February 27, 2026 03:56
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a Vercel project configuration specifically for the docs app (apps/docs) so the docs deployment no longer inherits the repo-root vercel.json (which is tailored for the API server and references scripts that don’t exist under apps/docs).

Changes:

  • Added apps/docs/vercel.json to override the root Vercel configuration for the docs project.
  • Docs Vercel config specifies installCommand only, relying on Next.js framework auto-detection for build behavior.

@hotlong hotlong merged commit 6d206e6 into main Feb 27, 2026
5 of 7 checks passed
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