T
TanStack3mo ago
absent-sapphire

Updating to RC possibly broke deployment

Repo: redacted Netlify permalink to broken 404 link: https://68d329d2af81ec328595856a--hatchetbrand.netlify.app/ I migrated to createRouter() as per the guide. Current deps
"scripts": {
"dev": "vite dev",
"build": "vite build && tsc --noEmit",
"start": "vite start"
},
"dependencies": {
"@mdx-js/react": "^3.1.1",
"@mdx-js/rollup": "^3.1.1",
"@tanstack/react-router": "^1.132.2",
"@tanstack/react-router-devtools": "^1.132.2",
"@tanstack/react-start": "^1.132.2",
"@types/mdx": "^2.0.13",
"react": "^19.1.1",
"react-dom": "^19.1.1",
"rehype-pretty-code": "^0.14.1",
"remark-frontmatter": "^5.0.0",
"remark-gfm": "^4.0.1",
"remark-mdx-frontmatter": "^5.2.0",
"shiki": "^3.13.0",
"zod": "^4.1.11"
},
"devDependencies": {
"@csstools/postcss-global-data": "^3.1.0",
"@netlify/vite-plugin-tanstack-start": "^1.0.0",
"@shikijs/transformers": "^3.13.0",
"@types/node": "^24.5.2",
"@types/react": "^19.1.13",
"@types/react-dom": "^19.1.9",
"@vitejs/plugin-react": "^5.0.3",
"postcss-preset-env": "^10.4.0",
"typescript": "^5.9.2",
"vite": "^7.1.7",
"vite-tsconfig-paths": "^5.1.4"
}
"scripts": {
"dev": "vite dev",
"build": "vite build && tsc --noEmit",
"start": "vite start"
},
"dependencies": {
"@mdx-js/react": "^3.1.1",
"@mdx-js/rollup": "^3.1.1",
"@tanstack/react-router": "^1.132.2",
"@tanstack/react-router-devtools": "^1.132.2",
"@tanstack/react-start": "^1.132.2",
"@types/mdx": "^2.0.13",
"react": "^19.1.1",
"react-dom": "^19.1.1",
"rehype-pretty-code": "^0.14.1",
"remark-frontmatter": "^5.0.0",
"remark-gfm": "^4.0.1",
"remark-mdx-frontmatter": "^5.2.0",
"shiki": "^3.13.0",
"zod": "^4.1.11"
},
"devDependencies": {
"@csstools/postcss-global-data": "^3.1.0",
"@netlify/vite-plugin-tanstack-start": "^1.0.0",
"@shikijs/transformers": "^3.13.0",
"@types/node": "^24.5.2",
"@types/react": "^19.1.13",
"@types/react-dom": "^19.1.9",
"@vitejs/plugin-react": "^5.0.3",
"postcss-preset-env": "^10.4.0",
"typescript": "^5.9.2",
"vite": "^7.1.7",
"vite-tsconfig-paths": "^5.1.4"
}
It deployed fine prior to RC, as if it cannot find the index.js file once built. No build errors locally. Only the same warnings as seen on Netlify build log. (Also gives me 404 on Vercel) Likely something trivial as I see no one else seems to share this issue yet?
No description
No description
7 Replies
absent-sapphire
absent-sapphireOP3mo ago
Also I did a test and deployed a fresh repo via the "Deploy to Netlify" button from Start Basic, and it also breaks into 404 the same way. https://github.com/sebastiangraz/startest And the resulting broken link: https://celadon-truffle-060b1e.netlify.app/
sensitive-blue
sensitive-blue3mo ago
Hosting | TanStack Start React Docs
Hosting is the process of deploying your application to the internet so that users can access it. This is a critical part of any web development project, ensuring your application is available to the...
absent-sapphire
absent-sapphireOP3mo ago
Thank you, it worked. I already had it installed but not properly configured in vite.config, forgot to use netlify() in the plugin array. Also I had to set my Netlify env as legacy-peer-deps=true I assume to make it work on Vercel its installing Nitro V2/V3 correct?
stormy-gold
stormy-gold2mo ago
Has anyone run into Netlify Build w/ pnpm fails -- vite not found? I've been banging my head against a wall for 2 hours now to get it to build correctly, but it isn't working:
[build]
command = "pnpm build"
publish = "dist/client"

[build.environment]
PNPM_FLAGS = "--shamefully-hoist"
[build]
command = "pnpm build"
publish = "dist/client"

[build.environment]
PNPM_FLAGS = "--shamefully-hoist"
My package.json:
"scripts": {
"dev": "vite dev --port 3000",
"start": "vite --port 3000",
"build": "vite build",
"serve": "vite preview",
"test": "vitest run",
"lint": "eslint",
"format": "prettier",
"check": "prettier --write . && eslint --fix"
},
"scripts": {
"dev": "vite dev --port 3000",
"start": "vite --port 3000",
"build": "vite build",
"serve": "vite preview",
"test": "vitest run",
"lint": "eslint",
"format": "prettier",
"check": "prettier --write . && eslint --fix"
},
and my vite.config:
import netlify from '@netlify/vite-plugin-tanstack-start'
import tailwindcss from '@tailwindcss/vite'
import { tanstackStart } from '@tanstack/react-start/plugin/vite'
import viteReact from '@vitejs/plugin-react'
import { defineConfig } from 'vite'
import viteTsConfigPaths from 'vite-tsconfig-paths'

const config = defineConfig({
plugins: [
// this is the plugin that enables path aliases
viteTsConfigPaths({
projects: ['./tsconfig.json'],
}),
tailwindcss(),
tanstackStart(),
netlify(),
viteReact(),
],
})

export default config
import netlify from '@netlify/vite-plugin-tanstack-start'
import tailwindcss from '@tailwindcss/vite'
import { tanstackStart } from '@tanstack/react-start/plugin/vite'
import viteReact from '@vitejs/plugin-react'
import { defineConfig } from 'vite'
import viteTsConfigPaths from 'vite-tsconfig-paths'

const config = defineConfig({
plugins: [
// this is the plugin that enables path aliases
viteTsConfigPaths({
projects: ['./tsconfig.json'],
}),
tailwindcss(),
tanstackStart(),
netlify(),
viteReact(),
],
})

export default config
and the build logs:
...
> score-keeper@ build /opt/build/repo
3:58:55 PM: > vite build
3:58:55 PM: sh: 1: vite: not found
3:58:55 PM:  ELIFECYCLE  Command failed.
3:58:55 PM: ​
....
...
> score-keeper@ build /opt/build/repo
3:58:55 PM: > vite build
3:58:55 PM: sh: 1: vite: not found
3:58:55 PM:  ELIFECYCLE  Command failed.
3:58:55 PM: ​
....
I found a solution, if a little hacky: the build command in the toml file should be:
[build]
command = "pnpm build"
publish = "dist/client"

[context.production]
environment = {PNPM_FLAGS = "--shamefully-hoist"}
[build]
command = "pnpm build"
publish = "dist/client"

[context.production]
environment = {PNPM_FLAGS = "--shamefully-hoist"}
wee-sapphire
wee-sapphire2mo ago
cc @Netlify (Partner)
other-emerald
other-emerald2mo ago
Thank you — I've sent this onto the Netlify engineering team to look into.
flat-fuchsia
flat-fuchsia2mo ago
@Jack Stately would you be able to share the rest of your package.json (or your whole repro!)? 🙏

Did you find this page helpful?