Skip to content

Error when requiring package in Node: regeneratorRuntime is not defined #9

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
knordman opened this issue Dec 2, 2020 · 2 comments
Closed
Assignees
Labels
bug Something isn't working

Comments

@knordman
Copy link

knordman commented Dec 2, 2020

After installing the package, opening Node (v14.15.0), and trying to require the package there is an error about missing regeneratorRuntime. If I pull the .ts code and transpile it as part of my own project it works great. So I guess this has to do with the .js build / babel settings. I assume the package is intended to work in Node also?

Welcome to Node.js v14.15.0.
Type ".help" for more information.
> r = require('regex-to-strings')
Uncaught ReferenceError: regeneratorRuntime is not defined
    at toIterable (/...redacted.../node_modules/regex-to-strings/lib/Expansion.js:13:3)
    at new Expansion (/...redacted.../node_modules/regex-to-strings/lib/Expansion.js:52:22)
    at Object.<anonymous> (/...redacted.../node_modules/regex-to-strings/lib/Expansion.js:58:37)
@wimpyprogrammer wimpyprogrammer self-assigned this Dec 20, 2020
@wimpyprogrammer wimpyprogrammer added the bug Something isn't working label Dec 20, 2020
@wimpyprogrammer
Copy link
Owner

Hi Kristian, sorry I didn't respond sooner. I must have a problem with my GitHub notification settings.

Thanks so much for reporting this issue! I've adjusted the Babel settings and published version 2.0.1. Please let me know if you still encounter any issues!

@knordman
Copy link
Author

knordman commented Jan 5, 2021

Thank you very much, I can confirm that everything works as expected with 2.0.1 👍

wimpyprogrammer added a commit that referenced this issue Feb 7, 2021
wimpyprogrammer added a commit that referenced this issue Feb 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants