xmldsigjs icon indicating copy to clipboard operation
xmldsigjs copied to clipboard

Uncaught ReferenceError: regeneratorRuntime is not defined - non-functional in browser

Open AlexVallat opened this issue 3 years ago • 3 comments

When running in a browser, XmlDSigJs cannot be loaded as it throws:

xmldsig.js:16316 Uncaught ReferenceError: regeneratorRuntime is not defined
    at xmldsig.js:16316
    at xmldsig.js:16436
    at xmldsig.js:16465
    at xmldsig.js:22824

This can be minimally reproduced by this fiddle: https://jsfiddle.net/ucrkbtdv/

AlexVallat avatar Mar 30 '21 10:03 AlexVallat

Bisection indicates this occurred between 2.0.27 and 2.0.28

AlexVallat avatar Mar 30 '21 10:03 AlexVallat

Looks like you need Babel polyfill

microshine avatar May 10 '21 19:05 microshine

@AlexVallat Just do npm install regenerator-runtime and import 'regenerator-runtime' in your project and it will work.

linkurzweg avatar Dec 09 '21 10:12 linkurzweg