#[Sites] pnpm Turborepo monorepo — stuck on FINALIZING stage like for hours.*

13 messages · Page 1 of 1 (latest)

glossy spruce
#

deployment seems to never finish.
Testing Appwrite Sites with a standard pnpm Turborepo monorepo (npx create-turbo@latest). Repo: https://github.com/saitrogen/turborepo-monorepo-

Stack: Next.js 16.1.5, pnpm 9.0.0, Node ≥18.

Issue 1 — SSR bundler expects next.config. at repo root (monorepo gotcha)*

First attempt failed during "Bundling for SSR":

mv: can't rename '/usr/local/build/next.config.*': No such file or directory
Build archive was not created at /mnt/code/code.tar.gz

In a monorepo, next.config.js lives inside each app subfolder (web, docs), not the repo root(at leat in my knowledge- the starter came like that). Workaround: added a minimal next.config.js at repo root.

Issue 2 — Site deployed "Active" but times out on every request

After fixing Issue 1, the build succeeded and Appwrite reported deployment as Active. But visiting the URL returned a timeout on every request. Root cause found in build logs:

MODCLEAN Version 2.1.2Searching for files in /usr/local/build/apps/docs/.next/node_modules...Found 7030 files/folders to removeFILES/FOLDERS DELETED: Total 3550

Fix applied: Added output: 'standalone' to all next.config.js files (root + both apps). With standalone mode, Next.js generates a self-contained server.js in .next/standalone/ that doesn't need node_modules at runtime.

results: still the same [deployed but not reachable,stuck on finalizing]

Current Appwrite Site settings for docs:

Root directory: / (repo root)
Install: pnpm install --frozen-lockfile
Build: pnpm -C apps/docs build
Output: ./apps/docs/.next
Rendering: SSR

Questions for the team:

  • Is output: 'standalone' required for Next.js SSR on Appwrite Sites, or is this a monorepo-specific issue?
  • Is the next.config.* at repo root requirement documented anywhere for monorepos?
  • Anything else needed to make pnpm Turborepo monorepos work on Sites?

i just wann make this work... help

GitHub

Contribute to saitrogen/turborepo-monorepo- development by creating an account on GitHub.

#

please help i am student (ug ) i was actually going to introduce appwrite to class since appwrite is simple (not so bulky ) it just works simply. but now i am stuck
asked help from ai , he couldnt figure it out..

tulip sigil
#

Standalone not required

#

It seems you are getting timed out.
Try increasing resources.
In the settings

#

And it also kind of happens to me the site times out just after a deployment is created.

glossy spruce
#

first the finilzing has to complete right? its never complete for mono repo setup

glossy spruce
tulip sigil
#

Probably a bug which causes this.
Someone reported this. I dont know if they are working on it.

glossy spruce
#

is there any way bro we can deploye monorepo ?
i use turbo with this setup

tulip sigil
#

You should be able to.
But I dont know how.
I saw many people use this for functions. Site shares a similar infra like function.
Wait till someone with knowledge replies.
Or ask in #🏠│general

glossy spruce
#

I got the solution

glossy spruce