You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Start] v1.143.3 breaks both dev and production - Buffer is not defined + attachRouterServerSsrUtils is not defined #6204
Open browser at http://localhost:3000/
Check console → Error: ReferenceError: Buffer is not defined at node_modules/postgres/src/bytes.js
Note: Database is ONLY imported in .server.ts files but gets bundled in browser anyway.
Expected behavior
Server-only code (.server.ts files) and their dependencies (like postgres, pg, drizzle-orm) should be completely excluded from the client bundle and never execute in the browser.
Screenshots or Videos
buffer.error.mp4
Platform
Router / Start Version: 1.143.3
OS: macOS
Browser: Chrome
Bundler: Vite
Database: PostgreSQL with Drizzle ORM
Packages affected: Both postgres@3.4.7 and pg@8.x exhibit the same issue
ERROR Worker error: A provided trusted origin is invalid, make sure your trusted origins list is properly defined. 10:21:03 PM
10:21:03 PM [vite] Internal server error: fetch failed
at node:internal/deps/undici/undici:13510:13
at async fetchAddress (file:///private/tmp/real-state/node_modules/nitro/dist/_dev.mjs:77:9)
at async nitroDevMiddleware (file:///private/tmp/real-state/node_modules/nitro/dist/_build/vite.plugin.mjs:279:19)
Activity
coderabbitai commentedon Dec 23, 2025
📝 CodeRabbit Plan Mode
Generate an implementation plan and prompts that you can use with your favorite coding agent.
Examples
🔗 Similar Issues
Possible Duplicates
Related Issues
🔗 Related PRs
#5215 - fix: various fixes [merged]
#5284 - tests(start): update spa mode e2e to use production build [merged]
#5647 - test(solid-start): fix dev server for suspense transition [merged]
#5896 - fix: memory leaks [merged]
#5903 - fix(solid-start): fix hydration regression in 1.136.9 [merged]
👤 Suggested Assignees
🧪 Issue enrichment is currently in open beta.
You can configure auto-planning by selecting labels in the issue_enrichment configuration.
To disable automatic issue enrichment, add the following to your
.coderabbit.yaml:💬 Have feedback or questions? Drop into our discord or schedule a call!
schiller-manuel commentedon Dec 23, 2025
please provide a complete example project as a git repo
Andresuito commentedon Dec 23, 2025
It happens to me in this project - Link
schiller-manuel commentedon Dec 23, 2025
i cannot get your project to run and to reproduce your error:
bun ibun devthen i got this error:
Andresuito commentedon Dec 24, 2025
Sorry, I had the plugins in the wrong order in vite.config.ts.
joshymcd commentedon Dec 24, 2025
@Andresuito whats your correct order? im having the same issue
Andresuito commentedon Dec 24, 2025
@joshymcd This
nick-cheatwood7 commentedon Dec 24, 2025
I was facing the exact same issue (with
kyselyinstead ofdrizzle), and this fixed it for me, too. Thanks!