select icon indicating copy to clipboard operation
select copied to clipboard

ReferenceError: regeneratorRuntime is not defined

Open StarpTech opened this issue 5 years ago • 1 comments

Hi, I try to test your hook in Next.js but I got this error. Could you ship your hook in a none transpiled version too?

ReferenceError: regeneratorRuntime is not defined
useDebounce
/mnt/ssd/repositories/test/ui/node_modules/use-select/dist/index.js:193:3
useSelect
/mnt/ssd/repositories/test/ui/node_modules/use-select/dist/index.js:392:27
MySelect
./components/MySelect.js:10
   7 | const optionsRef = useRef();
   8 | 
   9 | // Use useSelect to manage select state
> 10 | const {
     | ^  11 |   visibleOptions,
  12 |   selectedOption,
  13 |   highlightedOption,

StarpTech avatar Apr 11 '20 20:04 StarpTech

I got the same error, I had to manually add import "regenerator-runtime/runtime"; to my _app.js file in Next.js to be able to use this lib.

sergiodxa avatar Jun 01 '20 22:06 sergiodxa