pierrec / node-eval

Evaluate node require() module content directly
MIT License
93 stars 20 forks source link

The latest commit triggers an ReferenceError #22

Closed OceanLin closed 3 years ago

OceanLin commented 3 years ago

The latest commit (https://github.com/pierrec/node-eval/commit/527557aa29cff8ab0993dc2351ba3520631b6528) add a line of code "sandbox.URL = URL", however URL is not defined before.

I use the plugin "static-site-generator-webpack-plugin" which uses your package in their code and I got the error today when I built my package.

ERROR in ReferenceError: URL is not defined at module.exports (/home/circleci/repo/web_static/node_modules/eval/eval.js:59:17)

Liammarwood commented 3 years ago

This has happened with my project too, quick fix is to have the eval: "0.1.4" in the package.json