I understand you're experiencing issues after upgrading to Nuxt 3.16.1. Based on the knowledge sources, there are several known issues with Nuxt 3.16.0/3.16.1 that might be related to your problems.
Issue 1: Configuration Options Breaking
Your configuration options breaking in nuxt.config.ts might be related to changes in how aliases are handled in Nuxt 3.16. There was a reported issue where the alias entry stopped working properly in Nuxt 3.16.0:
Github Issue #31339 shows that aliases that worked correctly in v3.15.4 stopped working in v3.16.0. This was fixed in PR #31278, but if you're using an early 3.16.x version, you might still encounter this issue.
Another potential configuration issue could be related to path aliases in the server configuration. Github Issue #31398 reported that tsconfig.server.json was losing path aliases after upgrading to 3.16.0.
Issue 2: TRPC Server Environment Error
Your TRPC error about using "@trpc/server in a non-server environment" might be related to dependency resolution issues in Nuxt 3.16. Several issues have been reported with dependency resolution:
-
Github Issue #31180 describes a problem with ohash versions where Nuxt 3.16 uses [email protected] but some modules might still require [email protected]. This causes build errors with messages like "X is not exported by Y".
-
Github Issue #31355 specifically mentions "mismatching versions of ohash lead to hydration failures" in Nuxt 3.16.0.
-
Github Issue #28850 reports a similar error: "This module cannot be imported in server runtime" which was fixed in 3.15.4 but appears to have regressed in 3.16.0.