NPM Build failing without any changes.
Hi,
I am new to start (and react). I built an app with start (using CLI to scaffold). I was setting up the project on a different machine and have started bumping into build issue while the code base has not changed.
"@tanstack/react-router": "^1.131.28",
"@tanstack/react-router-devtools": "^1.131.28",
"@tanstack/react-start": "^1.131.28",
Dev dependencies
"vite": "^6.3.6",
"vite-tsconfig-paths": "^5.1.4",
"vitest": "^3.2.4"
npm i already gives me some warning, which I find weird, because I am not using those versions
npm warn Found: vite@7.1.12
npm warn node_modules/vite
npm warn dev vite@"^6.3.6" from the root project
npm warn 11 more (@tanstack/directive-functions-plugin, ...)
npm warn
npm warn Could not resolve dependency:
npm warn peer vite@">=7.0.0" from @tanstack/react-start@1.134.3
npm warn node_modules/@tanstack/react-start
npm warn @tanstack/react-start@"^1.131.28" from the root project
npm warn ERESOLVE overriding peer dependency
npm warn While resolving: @tanstack/start-plugin-core@1.134.3
npm warn Found: vite@6.4.1
npm warn node_modules/vite
npm warn dev vite@"^6.3.6" from the root project
npm warn 8 more (@tanstack/directive-functions-plugin, ...)
npm warn
npm warn Could not resolve dependency:
npm warn peer vite@">=7.0.0" from @tanstack/start-plugin-core@1.134.3
but install finishes and then npm run build gives me errors
error during build:
node_modules/@tanstack/start-client-core/dist/esm/client/hydrateStart.js (3:9): "getRouter" is not exported by "src/router.tsx", imported by "node_modules/@tanstack/start-client-core/dist/esm/client/hydrateStart.js".
1: import { hydrate } from "@tanstack/router-core/ssr/client";
2: import { startInstance } from "#tanstack-start-entry";
3: import { getRouter } from "#tanstack-router-entry";
^
4: import { ServerFunctionSerializationAdapter } from "./ServerFunctionSerializationAdapter.js";
5: async function hydrateStart() {
Am I missing something?
2 Replies
sharp-indigo•4w ago
Are youupgrading from older version of start?
Or this is a newly scaffolded project? What cli are you using by the way?
correct-apricotOP•4w ago
I didn't upgrade, it was a project that I had scaffolded a couple of months back. I was using @latest when I created it back then.. I see that my initial commit and my latest package.json are the same in terms of version for start and route