T
TanStack2mo ago
sensitive-blue

Seeing this SSR issue trying to deploy to vercel tonight. On version 1.131.28

I thought SSR was on by default? TypeError: Cannot set properties of undefined (setting 'ssr') at attachRouterServerSsrUtils (file:///var/task/node_modules/.nitro/@tanstack/router-core@1.132.47/dist/esm/ssr/ssr-server.js:32:14) ... 7 lines matching cause stack trace ... at async Server.<anonymous> (/opt/rust/nodejs.js:16:7788) { cause: TypeError: Cannot set properties of undefined (setting 'ssr') at attachRouterServerSsrUtils (file:///var/task/nodemodules/.nitro/@tanstack/router-core@1.132.47/dist/esm/ssr/ssr-server.js:32:14) at file:///var/task/chunks//ssr.mjs:1435:13 at process.processTicksAndRejections (node:internal/process/taskqueues:105:5) at async file:///var/task/chunks//ssr.mjs:1459:34 at async startRequestResolver (file:///var/task/chunks/_/ssr.mjs:1381:24) at async Object.handler (file:///var/task/index.mjs:1531:19) at async toNodeHandle (file:///var/task/index.mjs:1802:7) at async Server.r (/opt/rust/nodejs.js:2:15569) at async Server.<anonymous> (/opt/rust/nodejs.js:16:7788), statusCode: 500, fatal: false, unhandled: true, statusMessage: undefined, data: undefined
6 Replies
deep-jade
deep-jade2mo ago
You said the version was 1.131.28 but router-core in the error trace says 1.132.47. make sure your either on 131 or 132 in the package.json and reinstall. rm your node modules if you need to. If you still have issues, could you paste in your package.json?
sensitive-blue
sensitive-blueOP2mo ago
Oh good eye. I must’ve glanced over it. Standby and I’ll snag it this morning! I only quickly pulled a log off Vercel last night 🙂
deep-jade
deep-jade2mo ago
132 is the rc version with the last major set of breaking changes (hopefully). Lotta patchs on that one over the past two weeks or so.
extended-salmon
extended-salmon2mo ago
If your using pnpm overrides and catalog is your friend :p
sensitive-blue
sensitive-blueOP2mo ago
"@tanstack/react-form": "1.12.4", "@tanstack/react-query": "^5.81.5", "@tanstack/react-query-devtools": "^5.83.0", "@tanstack/react-router-with-query": "^1.130.17", "@tanstack/react-router": "1.131.28", "@tanstack/react-router-devtools": "1.131.28", "@tanstack/react-start": "1.131.28",
Weird, wtf is causing the bump up to 132 my package-lock.json has 1.131.28 too.. ooh, seems I might need to throw an override on these two: "@tanstack/router-core": "1.131.28" I think history might be pulling in a newer version of core, or perhaps it's react-router-with-query. In case anyone else hits this before a full 1.132 upgrade - I've pinned my versions to:
"@tanstack/react-form": "1.12.4",
"@tanstack/react-query": "5.90.2",
"@tanstack/react-query-devtools": "5.90.2",
"@tanstack/react-router-with-query": "1.130.17",
"@tanstack/react-router": "1.131.28",
"@tanstack/react-router-devtools": "1.131.28",
"@tanstack/react-start": "1.131.28",
"@tanstack/react-table": "8.21.3",
"@tanstack/react-form": "1.12.4",
"@tanstack/react-query": "5.90.2",
"@tanstack/react-query-devtools": "5.90.2",
"@tanstack/react-router-with-query": "1.130.17",
"@tanstack/react-router": "1.131.28",
"@tanstack/react-router-devtools": "1.131.28",
"@tanstack/react-start": "1.131.28",
"@tanstack/react-table": "8.21.3",
then added the override.
deep-jade
deep-jade2mo ago
Ahhhhhh that'll do it Can you check router core in your package lock?

Did you find this page helpful?