T
TanStack4mo ago
flat-fuchsia

Client-side JS does not work at all, h3 error in console

My app works perfectly in the developer mode. When I deploy to netlify or vercel, all of my client side JS breaks, and nothing works. There are no build errors. In the browser console, I'm getting this error: Uncaught (in promise) TypeError: Failed to resolve module specifier "h3". Relative references must start with either "/", "./", or "../". My app.config.ts looks like this:
import { defineConfig } from '@tanstack/react-start/config';
import tsConfigPaths from 'vite-tsconfig-paths';

export default defineConfig({
vite: {
plugins: [
tsConfigPaths({
projects: ['./tsconfig.json']
})
],
build: {
rollupOptions: {
external: [
'node:stream',
'node:stream/web',
'node:async_hooks',
'node:fs',
'node:path'
]
}
}
},
server: {
preset: 'vercel'
}
});
import { defineConfig } from '@tanstack/react-start/config';
import tsConfigPaths from 'vite-tsconfig-paths';

export default defineConfig({
vite: {
plugins: [
tsConfigPaths({
projects: ['./tsconfig.json']
})
],
build: {
rollupOptions: {
external: [
'node:stream',
'node:stream/web',
'node:async_hooks',
'node:fs',
'node:path'
]
}
}
},
server: {
preset: 'vercel'
}
});
0 Replies
No replies yetBe the first to reply to this messageJoin

Did you find this page helpful?