-
Notifications
You must be signed in to change notification settings - Fork 418
Description
Preliminary Checks
-
I have reviewed the documentation: https://clerk.com/docs
-
I have searched for existing issues: https://github.com/clerk/javascript/issues
-
I have not already reached out to Clerk support via email or Discord (if you have, no need to open an issue here)
-
This issue is not a question, general help request, or anything other than a bug report directly related to Clerk. Please ask questions in our Discord community: https://clerk.com/discord.
Reproduction
https://github.com/runeborg/clerk-repro
Publishable key
pk_test_Z2VuZXJvdXMtbG9ic3Rlci05My5jbGVyay5hY2NvdW50cy5kZXYk
Description
I am running @clerk/tanstack-react-start in a vite project and I get the following error:
The error occurs in src/tokens/clerkRequest.ts in @clerk/backend. There are no other libraries referencing the cookie package (verified in package-lock). The error only occurs when running vite dev, in production there are no errors. Could possibly use cookie-es or similar instead?
If anyone else runs into this: A temporary fix is to add the following into vite.config
optimizeDeps: { include: ["cookie"] },
Environment
System:
OS: macOS 15.7.3
CPU: (14) arm64 Apple M4 Pro
Memory: 485.66 MB / 48.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 22.20.0 - /usr/local/bin/node
npm: 10.9.3 - /usr/local/bin/npm
pnpm: 10.26.1 - /usr/local/bin/pnpm
bun: 1.3.5 - /Users/christianruneborg/.bun/bin/bun
Browsers:
Chrome: 143.0.7499.170
Firefox: 143.0.1
Safari: 26.1
npmPackages:
@clerk/clerk-react: ^5.49.0 => 5.59.2
@clerk/tanstack-react-start: ^0.27.12 => 0.27.12
@tailwindcss/vite: ^4.0.6 => 4.1.18
@tanstack/devtools-vite: ^0.3.11 => 0.3.12
@tanstack/react-devtools: ^0.7.0 => 0.7.11
@tanstack/react-router: ^1.132.0 => 1.143.3
@tanstack/react-router-devtools: ^1.132.0 => 1.143.3
@tanstack/react-router-ssr-query: ^1.131.7 => 1.143.3
@tanstack/react-start: ^1.132.0 => 1.143.3
@tanstack/router-plugin: ^1.132.0 => 1.143.3
@testing-library/dom: ^10.4.0 => 10.4.1
@testing-library/react: ^16.2.0 => 16.3.1
@types/node: ^22.10.2 => 22.19.3
@types/react: ^19.2.0 => 19.2.7
@types/react-dom: ^19.2.0 => 19.2.3
@vitejs/plugin-react: ^5.0.4 => 5.1.2
babel-plugin-react-compiler: ^1.0.0 => 1.0.0
jsdom: ^27.0.0 => 27.3.0
lucide-react: ^0.561.0 => 0.561.0
nitro: latest => 3.0.1-alpha.1
react: ^19.2.0 => 19.2.3
react-dom: ^19.2.0 => 19.2.3
tailwindcss: ^4.0.6 => 4.1.18
typescript: ^5.7.2 => 5.9.3
vite: ^7.1.7 => 7.3.0
vite-tsconfig-paths: ^6.0.2 => 6.0.3
vitest: ^3.0.5 => 3.2.4
web-vitals: ^5.1.0 => 5.1.0