tanstack start compression setup with nitro
I try to setup react start with nitrov2 and I want to compress with gzip. This is my vite.config.ts:
but when I deploy I get this error and I cant figure out what it means:
export default defineConfig({
plugins: [
tsConfigPaths(),
tanstackStart(),
nitroV2Plugin({
compressPublicAssets: { gzip: true, brotli: false },
}),
react(),
],
...
export default defineConfig({
plugins: [
tsConfigPaths(),
tanstackStart(),
nitroV2Plugin({
compressPublicAssets: { gzip: true, brotli: false },
}),
react(),
],
...
[request error] [unhandled] [GET] http://my-domain:3000/favicon.ico
TypeError: handler is not a function
at Object.handler (file:///usr/src/my-project/.output/server/chunks/nitro/nitro.mjs:1866:34)
... 4 lines matching cause stack trace ...
at async Server.toNodeHandle (file:///usr/src/my-project/.output/server/chunks/nitro/nitro.mjs:1838:7) {
cause: TypeError: handler is not a function
at Object.handler (file:///usr/src/my-project/.output/server/chunks/nitro/nitro.mjs:1866:34)
at Object.handler (file:///usr/src/my-project/.output/server/chunks/nitro/nitro.mjs:1496:24)
at Object.handler (file:///usr/src/my-project/.output/server/chunks/nitro/nitro.mjs:1806:34)
at Object.handler (file:///usr/src/my-project/.output/server/chunks/nitro/nitro.mjs:1567:31)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Server.toNodeHandle (file:///usr/src/my-project/.output/server/chunks/nitro/nitro.mjs:1838:7),
statusCode: 500,
fatal: false,
unhandled: true,
statusMessage: undefined,
data: undefined
}
[request error] [unhandled] [GET] http://my-domain:3000/favicon.ico
TypeError: handler is not a function
at Object.handler (file:///usr/src/my-project/.output/server/chunks/nitro/nitro.mjs:1866:34)
... 4 lines matching cause stack trace ...
at async Server.toNodeHandle (file:///usr/src/my-project/.output/server/chunks/nitro/nitro.mjs:1838:7) {
cause: TypeError: handler is not a function
at Object.handler (file:///usr/src/my-project/.output/server/chunks/nitro/nitro.mjs:1866:34)
at Object.handler (file:///usr/src/my-project/.output/server/chunks/nitro/nitro.mjs:1496:24)
at Object.handler (file:///usr/src/my-project/.output/server/chunks/nitro/nitro.mjs:1806:34)
at Object.handler (file:///usr/src/my-project/.output/server/chunks/nitro/nitro.mjs:1567:31)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Server.toNodeHandle (file:///usr/src/my-project/.output/server/chunks/nitro/nitro.mjs:1838:7),
statusCode: 500,
fatal: false,
unhandled: true,
statusMessage: undefined,
data: undefined
}
0 Replies