Hi, I'd like to share a possible fix that I found. You may be having the same issue:
Fix: 408 Timeout / SSR + Nuxt UI on Appwrite
If you're deploying Nuxt 4 + SSR to Appwrite Sites and seeing deployment success but runtime crashes, this fix is for you.
The Issue
Enabling @nuxt/ui causes the runtime container (openruntimes/node) to restart indefinitely, leading to HTTP 408 Timeouts.
Symptoms
Build succeeds, but logs show: Error [ERR_MODULE_NOT_FOUND]: ... @iconify/utils/lib/emoji/test/parse.js
Static (nuxt generate) works, but SSR fails specifically when @nuxt/ui is present.
Root Cause: Appwrite ModClean
Appwrite’s runtimes use modclean to prune unnecessary files. Because Nitro treats @iconify as an external dependency, required files are not bundled into .output/server. Appwrite then deletes these "unnecessary" files, causing the Node process to crash when it tries to resolve them at runtime.
The Fix
Force Nitro to inline (bundle) the problematic dependencies so they aren't stripped away.
Update your nuxt.config.ts:
TypeScript
export default defineNuxtConfig({
modules: ['@nuxt/ui'],
ssr: true,
compatibilityDate: '2025-01-15',
nitro: {
preset: 'node-server',
externals: {
inline: ['@nuxt/ui', '@iconify/utils', '@iconify/types']
}
}
Why this works
By adding these to nitro.externals.inline, you force Nitro to:
- Bundle these packages directly into the server output.
- Prevent Appwrite’s cleanup process from stripping "hidden" dependencies.
Resolve the ERR_MODULE_NOT_FOUND and the resulting 408 timeout.