-
Notifications
You must be signed in to change notification settings - Fork 34
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
Reference Error log is not defined #36
Comments
I'm seeing this too (error logs below, for reference) Stack Trace
The issue seems to be caused by: Line 3 in 82de25f
The fix would be to update it to: - log = console.log.bind(console),
+ const log = (...args) => console.log(...args); If this project is still maintained, I'd be happy to run some tests and submit a PR? :) @techwithtwin, are you using a non-node runtime, like Deno? If so, that would explain why you're seeing this, as the method binding technique used here works only in Node.js, because console.log is a build-in function. But this approach will cause issues in any other runtime environment, since it won't be able to handle the bound reference properly. I'm guessing the original purpose of this is to ensure that console.log is always called with the correct |
In case anyone was looking for a working version, I've re-written this package to resolve this issue, and to make it compatible with newer versions of JS as well as a variety of runtimes. https://gist.github.com/Lissy93/e33a6b2218f57c51127bbbe7046f5c83 Hope that helps someone :) |
The text was updated successfully, but these errors were encountered: