Skip to content

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

@knordman

Description

@knordman

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)

Metadata

Metadata

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions