I just created a fresh TanStack Start project using:
yarn create @tanstack/start --package-manager yarn --no-git
When running yarn dev, I ran into errors that were resolved by manually adding @tanstack/router-core and @tanstack/query-core to my dependencies.
I believe this happens because Yarn Berry (and pnpm) don't auto-install peer dependencies like npm does. Since @tanstack/react-router and @tanstack/react-query have these -core packages as peer dependencies, they need to be explicitly declared.
@tanstack/router-ssr-query-core (used internally by @tanstack/react-router-ssr-query) has peer dependencies on the -core packages and they aren't propagated upwards and declared as dependencies in the starter template project.
My question: For users using Yarn Berry or pnpm, should these -core packages be listed as explicit dependencies in the starter template? Or is there a recommended workaround/configuration that I'm missing?
For reference:
Yarn 4.12.0 (Berry)
Node linker: pnpm (NOT PnP)
Would love to know if this is something that should be addressed in the template or if there's a better approach for strict package managers. Thanks!