TanStackT
TanStack2d ago
13 replies
few-sapphire

https on localhost not working

I am new to tanstack start.

Below is my vite.config.ts

import { defineConfig } from 'vite'
import { devtools } from '@tanstack/devtools-vite'
import { tanstackStart } from '@tanstack/react-start/plugin/vite'
import viteReact from '@vitejs/plugin-react'
import viteTsConfigPaths from 'vite-tsconfig-paths'
import tailwindcss from '@tailwindcss/vite'
import { nitro } from 'nitro/vite'

import mkcert from 'vite-plugin-mkcert'


const config = defineConfig({
  plugins: [
    mkcert(),
    devtools(),
    nitro(),
    // this is the plugin that enables path aliases
    viteTsConfigPaths({
      projects: ['./tsconfig.json'],
    }),
    tailwindcss(),
    tanstackStart({
      router: {
        routeToken: "_layout",
      }
    }),
    viteReact(),
  ],
})

export default config


When I run the app using pnpm dev or npm run dev and navigate to any route, the app immediately stop with the following error:

(node:5830) UnsupportedWarning: The provided connection header is not valid, the value will be dropped from the header and will never be in use.
(Use node --trace-warnings ... to show where the warning was created)
node:internal/http2/util:805
throw new ERR_HTTP2_INVALID_CONNECTION_HEADERS(key);


Note I am using the latest tanstack start version. I created the project yesterday by following the documentation.

I am building by application currently using nextjs and want to migrate to tanstack start, but this error is killing me. Any help would be greatly appreciated.
Was this page helpful?