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.

Issue when used in nextjs project

See original GitHub issue

So the decision was made to move the site to nextjs to improve response time, and we’ve encountered the following error when trying to load a component that uses your package:

Server Error
ReferenceError: regeneratorRuntime is not defined

This error happened while generating the page. Any console logs will be displayed in the terminal window.
Call Stack
<unknown>
file:///G:/Repositories/Biomarkerz/biosurveyfs/client/node_modules/react-speech-recognition/lib/RecognitionManager.js (168:61)
<unknown>
file:///G:/Repositories/Biomarkerz/biosurveyfs/client/node_modules/react-speech-recognition/lib/RecognitionManager.js (239:6)
Object.<anonymous>
file:///G:/Repositories/Biomarkerz/biosurveyfs/client/node_modules/react-speech-recognition/lib/RecognitionManager.js (334:2)

image

I’m hoping there is a simple fix for this. This package is fantastic and I loathe the thought of changing the implementation

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

5reactions
JamesBrillcommented, Mar 7, 2021

Hi @Nitzahon Could you try the following:

  • npm i --save regenerator-runtime
  • Put this at the top of your _app.js file: import 'regenerator-runtime/runtime'

If this works, I’ll add this to the README as this seems to be a recurring problem for NextJS users.

2reactions
Nitzahoncommented, Mar 7, 2021

DARY!

Read more comments on GitHub >

github_iconTop Results From Across the Web

react-hydration-error - Next.js
In general this issue is caused by using a specific library or application code that is relying on something that could differ between...
Read more >
nextConfig issue while building or running the project #39161
It can potentially be dangerous for plugins to extend the Next.js config that it does not recognize as this might lead to unexpected...
Read more >
Next.js and Styled-Components: style loading issue
Have you tried using Styled-Components with your Next.js app but can't get the styles to load properly? This is because the server-side ...
Read more >
How to Build a Fullstack App with Next.js, Prisma, and ... - Vercel
In this guide, you learned how to build and deploy a fullstack application using Next.js, Prisma, and PostgreSQL. If you ran into issue...
Read more >
Best practices to increase the speed for Next.js apps
Use dynamic imports ... Traditionally, applications load all the components and the CSS required by the application in the initial load. Dynamic ...
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