T
TanStack2y ago
deep-jade

DefaultGlobalNotFound in production

I hope this message finds you well. I am currently working on a desktop application developed with React and Electron. To enhance TypeScript integration, I opted for Tanstack Router over React Router. I acknowledge that my error may pertains to this specific and somewhat unique environment, involving the Electron-Vite boilerplate (https://electron-vite.org/) for scaffolding the project. While the routing functions flawlessly in the development environment, the challenge arises after building the project. Instead of displaying the expected routes, the application shows <p>Not Found</p>—the default global not found component discovered during my investigation of the library archives. Given the niche nature of my problem, I seek guidance on debugging the application in a production environment. Is it possible to allow the application to crash, rather than displaying the DefaultGlobalNotFound component, which currently obscures potentially helpful error messages? I've heard about Tanstack Router dev tools—can they be employed post-build by simulating a hardcoded development environment, allowing for more effective debugging in production? My immediate goal is to comprehend the nature of the not found error, identify potential causes, and receive more detailed error messages. It's challenging because the issue manifests in production but not in the development environment. Your insights and assistance would be greatly appreciated. Thank you,
electron-vite | Next Generation Electron Build Tooling
Next generation Electron build tooling based on Vite.
6 Replies
deep-jade
deep-jadeOP2y ago
Hello, thanks for your time. I think this could be promising. When using Electron with React Router, we need to use hash routing instead of browser routing. The docs at /overview#hash-routing do not seem to show any tips on how to implement this. I tried to be creative here, but I'm not sure if I'm going in the right direction.
No description
sunny-green
sunny-green2y ago
History Types | TanStack Router Docs
While it's not required to know the @tanstack/history API itself to use TanStack Router, it's a good idea to understand how it works. Under the hood, TanStack Router requires and uses a history abstraction to manage the routing history. If you don't create a history instance, a browser-oriented instance of this API is created for you when the ...
sunny-green
sunny-green2y ago
hash history must be passed as history into createRouter
sunny-green
sunny-green2y ago
History Types | TanStack Router Docs
While it's not required to know the @tanstack/history API itself to use TanStack Router, it's a good idea to understand how it works. Under the hood, TanStack Router requires and uses a history abstraction to manage the routing history. If you don't create a history instance, a browser-oriented instance of this API is created for you when the ...
deep-jade
deep-jadeOP2y ago
Thank you so much! It worked! You really saved my life. I appreciate it!

Did you find this page helpful?