T
TanStack2mo ago
xenial-black

Has anyone deployed Tanstack Start in a pnpm monorepo on Vercel?

I keep getting a 404 on deploys.. My vite config:
import path from 'path'
import tailwindcss from '@tailwindcss/vite'
import { tanstackStart } from '@tanstack/react-start/plugin/vite'
import viteReact from '@vitejs/plugin-react'
import { nitro } from 'nitro/vite'
import { defineConfig } from 'vite'
import tsConfigPaths from 'vite-tsconfig-paths'

export default defineConfig({
server: {
port: 3000,
},
plugins: [
tsConfigPaths(),
tanstackStart(),
nitro({
config: {
compatibilityDate: 'latest',
preset: 'vercel',
},
}),
viteReact(),
tailwindcss(),
],
resolve: {
alias: {
'@': path.resolve(__dirname, 'src'),
},
},
})
import path from 'path'
import tailwindcss from '@tailwindcss/vite'
import { tanstackStart } from '@tanstack/react-start/plugin/vite'
import viteReact from '@vitejs/plugin-react'
import { nitro } from 'nitro/vite'
import { defineConfig } from 'vite'
import tsConfigPaths from 'vite-tsconfig-paths'

export default defineConfig({
server: {
port: 3000,
},
plugins: [
tsConfigPaths(),
tanstackStart(),
nitro({
config: {
compatibilityDate: 'latest',
preset: 'vercel',
},
}),
viteReact(),
tailwindcss(),
],
resolve: {
alias: {
'@': path.resolve(__dirname, 'src'),
},
},
})
No description
6 Replies
eastern-cyan
eastern-cyan5w ago
same for me
rising-crimson
rising-crimson5w ago
cc @pi0 @millu @Daniel S can you please provide a complete project ?
eager-peach
eager-peach5w ago
@Daniel S @millu a screenshot of your deployment config would also be useful. do you set project root dir?
yappiest-sapphire
yappiest-sapphire4w ago
Here my template and still works fine on vercel => https://github.com/CarlosZiegler/fullstack-start-template
GitHub
GitHub - CarlosZiegler/fullstack-start-template: This project provi...
This project provides a solid foundation for building modern web applications using a curated stack of technologies focused on developer experience, performance, and type safety. - CarlosZiegler/fu...
yappiest-sapphire
yappiest-sapphire4w ago
GitHub
fullstack-start-template/vite.config.ts at 6bc17495b6619bc784f87dcf...
This project provides a solid foundation for building modern web applications using a curated stack of technologies focused on developer experience, performance, and type safety. - CarlosZiegler/fu...
xenial-black
xenial-blackOP4w ago
Hey all, appreciate the help. After discussing with Vercel support, I was able to fix it by: - setting Root Directory to apps/web - setting Build Command to pnpm --recursive run build Here is my example: https://github.com/dschlabach/tanstack-pnpm-monorepo-example
GitHub
GitHub - dschlabach/tanstack-pnpm-monorepo-example
Contribute to dschlabach/tanstack-pnpm-monorepo-example development by creating an account on GitHub.
No description

Did you find this page helpful?