Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

registerGlobalMiddleware has no effect. #3869

Open
rtrampox opened this issue Mar 27, 2025 · 8 comments
Open

registerGlobalMiddleware has no effect. #3869

rtrampox opened this issue Mar 27, 2025 · 8 comments
Labels
start Everything about TanStack Start

Comments

@rtrampox
Copy link

Which project does this relate to?

Start

Describe the bug

middlewares added globally with registerGlobalMiddleware never run.

Your Example Website or App

https://stackblitz.com/github/tanstack/router/tree/main/examples/react/start-basic?file=src%2Fglobal-middleware.ts

Steps to Reproduce the Bug or Issue

  1. Go to stackblitz example.
  2. Test with anything that invokes a server function.
  3. See that the logger middleware never runs, and nothing is logged to the console.

Expected behavior

The logger middleware is expected to output to the console, but nothing is being showed.

Screenshots or Videos

No response

Platform

  • OS: Windows, and Linux
  • Browser: Edge
  • Version: 134.0

Additional context

No response

@schiller-manuel schiller-manuel added the start Everything about TanStack Start label Mar 27, 2025
@EliasGit117
Copy link

What is weird, on my mac it works as intended, but on windows it does nothing

@rtrampox
Copy link
Author

What is weird, on my mac it works as intended, but on windows it does nothing

It worked once in a stackblitz container, and then I tried my codebase, and nothing. Even inside a docker container.

@1adybug
Copy link

1adybug commented Apr 11, 2025

The same template and problem. I even added throw new Error("test") to the file and it didn't cause the program to crash. It seems that the file is not executed at all.

@EliasGit117
Copy link

On server with linux also everything works as intended, so I assume it could be only windows node problem

@schiller-manuel
Copy link
Contributor

maybe a case sensitivity issue?

@EliasGit117
Copy link

maybe a case sensitivity issue?

Didn't get you

@schiller-manuel
Copy link
Contributor

just thought how windows and Linux/Mac differ. and one difference is whether the file system is case sensitive or not.

@rtrampox
Copy link
Author

just thought how windows and Linux/Mac differ. and one difference is whether the file system is case sensitive or not.

If it's Windows related, it's probably an issue with the backslashes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
start Everything about TanStack Start
Projects
None yet
Development

No branches or pull requests

4 participants