question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Vite throws 'Uncaught ReferenceError: regeneratorRuntime is not defined'

See original GitHub issue

Describe the bug Uncaught ReferenceError: regeneratorRuntime is not defined when using react-location with Vite.

To Reproduce Steps to reproduce the behavior:

  1. yarn create vite --template react-ts
  2. yarn
  3. yarn add @tanstack/react-location
  4. Replace App.tsx with code below
  5. 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 Console error

Desktop (please complete the following information):

  • OS: Windows 10 64-bits
  • Browser: Chrome
  • Version: 98.0.4758.102

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:6
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

6reactions
danielbayerleincommented, Mar 9, 2022

The problem still exists with version 3.7.0.

4reactions
ruisaraiva19commented, Mar 6, 2022

This still happens with version 3.6.5 which has #223.

Dependencies

Only works when using version react-location <= 3.3.4

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found