build error after latest dependencies installation.
after bun install the depencies i'm getting this error from app.config.ts

17 Replies
typical-coralOP•6mo ago
@jherr sorry for ping. but it also happening with
bunx create-tsrouter-app@latest start add-ondeep-jade•6mo ago
for one thing, your version numbers are somewhat strange. the @tanstack/* packages are at 2.114.3 which should be in the 1.x.x range, and you seem to have access to React 20? You lucky you.
Having said that, I see the same errors when starting a new Tanstack Start app and updating the packages to latest (which is 1.121.0 I think).
app.config.ts gives an error (can't find it) on the line:
import { defineConfig } from "@tanstack/react-start/config";
I have an 'old' project where packages are on 1.120.5 that works with no issues, and in node_modules I see a @tanstack/react-start-config folder which is not there in the failing 1.121.0 project.
typical-coralOP•6mo ago
i'm used the
create-tsrouter-app@latest to create start app and all the versions are from that.
@hotelyorba can you share the package.json which worked for you? i can ping to exect version and avoid latest version installationdeep-jade•6mo ago
"dependencies": {
"@tailwindcss/vite": "^4.1.7",
"@tanstack/react-router": "^1.120.5",
"@tanstack/react-router-devtools": "^1.120.5",
"@tanstack/react-router-with-query": "^1.120.5",
"@tanstack/react-start": "^1.120.5",
"@tanstack/router-plugin": "^1.120.5",
"class-variance-authority": "^0.7.1",
"clsx": "^2.1.1",
"lucide-react": "^0.511.0",
"react": "^19.1.0",
"react-dom": "^19.1.0",
"tailwind-merge": "^3.3.0",
"tailwindcss": "^4.1.7",
"tailwindcss-animate": "^1.0.7",
"vinxi": "^0.5.6",
"vite-tsconfig-paths": "^5.1.4"
},
"devDependencies": {
"@biomejs/biome": "^1.9.4",
"@testing-library/dom": "^10.4.0",
"@testing-library/react": "^16.3.0",
"@types/react": "^19.1.4",
"@types/react-dom": "^19.1.5",
"@vitejs/plugin-react": "^4.4.1",
"jsdom": "^26.1.0",
"typescript": "^5.8.3",
"vite": "^6.3.5",
"vitest": "^3.1.3",
"web-vitals": "^5.0.1"
}
typical-coralOP•6mo ago
I assume the new alpha merge is kind of breacking changes. i was seeing some example from new merge any it seems like a lot of thing is changes, they remove the vinxi and using vite for build and start. in addition there is no api.ts thing any more in the repo!! Just had to wait for
jherr to implement the alpha version in the create-tsrouter-app@latest cli thing. Hopefully after that we can update the existing project according to that.deep-jade•6mo ago
Yeah, there's definitely bugs in there in v1.121.0.
I tried to install @tanstack/react-start-config manually and updated the line in app.config.ts to
import { defineConfig } from "@tanstack/react-start-config"; // instead of "react-start/config"
which solved the error on that line, but now I get a new error in console:
import { CONSTANTS as GENERATOR_CONSTANTS, startAPIRouteSegmentsFromTSRFilePath, } from '@tanstack/router-generator';
^^^^^^^^^
SyntaxError: The requested module '@tanstack/router-generator' does not provide an export named 'CONSTANTS'
ERROR Cannot read properties of undefined (reading 'config')
typical-coralOP•6mo ago
I fixed it using below guide.
Use this for the migration to v1.121.0.
https://github.com/TanStack/router/discussions/2863#discussioncomment-13104960
GitHub
Start BETA - Tracking · TanStack router · Discussion #2863
Tracking any important changes for TanStack Start during the BETA period. If you are coming from the ALPHA of TanStack Start, you can see all the breaking changes that were made here - #2403
deep-jade•6mo ago
hmm, I tried it but for me it gives me an error when I go to localhost:5173 :
Warning: useRouter must be used inside a <RouterProvider> component!
but I don't use useRouter inside my code.
(starting the dev server works fine though)
absent-sapphire•6mo ago
deep-jade•6mo ago
aha, when I set all the @tanstack/* packages to ^1.121.0-alpha.27 then it works, finally.
I remain at my point that it is definitely nog bugfree though, but it is in beta of course (and even alpha, apparently)
foreign-sapphire•6mo ago
The latest version of
create-tsrouter-app is now updated to the devinxi version. I haven't checked with bunx, TBH Bun is not a part of my personal test cycle.typical-coralOP•6mo ago
api route still need to fix. I created new app with trpc addon but it's still using
also in
import { createAPIFileRoute } from '@tanstack/react-start/api' which incorrect. It should be import { createServerFileRoute } from "@tanstack/react-start/server";also in
package.json vite is defined 2 times. 1 in dependencies and other one in devDependencies.foreign-sapphire•6mo ago
tRPC should be fixed in the latest release. I'll fix the vite duplicate as well.
If you don't want to do the upgrade today we have a tool to pin your versions so that you can update at a later time:
npx create-start-app@latest pin-versions. Execute that in your project directory to pin the start library version (and the versions of related libraries).adverse-sapphire•6mo ago
So what did your
package.json look like? I followed the linked guide and seeing the same error you did Warning: useRouter must be used inside a <RouterProvider> component!
These are my @tanstack/* package versions and vite
I can run the dev server, but when i go to load the page, i see the warning logged to the console
actually, all i had to do was delete node_modules and bun.lock then run bun install and everything worksforeign-sapphire•6mo ago
react-query v5 alpha wasnt that in 2023
foreign-sapphire•6mo ago
oh yeah 2 years ago lol

adverse-sapphire•6mo ago
May have taken the guide too seriously, thanks for pointing that out