Vite throws 'Uncaught ReferenceError: regeneratorRuntime is not defined'
See original GitHub issueDescribe the bug Uncaught ReferenceError: regeneratorRuntime is not defined when using react-location with Vite.
To Reproduce Steps to reproduce the behavior:
yarn create vite --template react-tsyarnyarn add @tanstack/react-location- Replace
App.tsxwith code below yarn dev
import { ReactLocation, Router } from '@tanstack/react-location';
const location = new ReactLocation();
function App() {
return (
<Router location={location} routes={[{ path: '/' }]}>
<h1>Title</h1>
</Router>
);
}
export default App;
Screenshots

Desktop (please complete the following information):
- OS: Windows 10 64-bits
- Browser: Chrome
- Version: 98.0.4758.102
Issue Analytics
- State:
- Created 2 years ago
- Reactions:6
- Comments:8 (3 by maintainers)
Top Results From Across the Web
Vite throws 'Uncaught ReferenceError: regeneratorRuntime is ...
Describe the bug Uncaught ReferenceError: regeneratorRuntime is not defined when using react-location with Vite.
Read more >Uncaught ReferenceError: regeneratorRuntime is not defined
im trying to send some data to my DB on mongo but when i push to add button this one doesnt send anything...
Read more >How to fix regeneratorRuntime is not defined?
First, I found this solution: add import "babel-polyfill"; at the top of the file that you are using the async function. BUT. later ......
Read more >regeneratorRuntime is not defined エラーと出た場合の対処
React LocationがVite環境で Uncaught ReferenceError: regeneratorRuntime is not defined エラーと出た場合の対処.
Read more >alpine uncaught ReferenceError: regeneratorRuntime is not ...
“alpine uncaught ReferenceError: regeneratorRuntime is not defined” Code Answer ... throw new TypeError('Router.use() requires a middleware function but got ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

The problem still exists with version 3.7.0.
This still happens with version 3.6.5 which has #223.
Dependencies
Only works when using version
react-location<= 3.3.4