You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 3, 2023. It is now read-only.
@jamen well, passing that function is indeed optional so I think the naming makes sense. On the other hand I'd really appreciate if lave() would return a string by default and obtaining the AST would be optional instead. @jed: Would you consider adding escodegen as dependency? (I'm aware that one could in theory use any Mozilla AST compatible formatter, I'm just wondering if this is even a real use case.)
Could you help me solve this problem please? I need to run a file javaScript codes on the node. But I can not do that. When I run, this message appears:
var newCode = escodegen.generate(contents);
ReferenceError: escodegen is not defined
at repl:1:15
at sigintHandlersWrap (vm.js:22:35)
at sigintHandlersWrap (vm.js:73:12)
at ContextifyScript.Script.runInThisContext (vm.js:21:12)
at REPLServer.defaultEval (repl.js:340:29)
at bound (domain.js:280:14)
at REPLServer.runBound [as eval] (domain.js:293:12)
at REPLServer. (repl.js:539:10)
at emitOne (events.js:101:20)
at REPLServer.emit (events.js:188:7)
Before I run, I installed esprima and escodegen on node.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hi Jed,
I get the following error and honestly don't understand what's going on here and why the tests pass. I'm obviously missing something here:
Shouldn't https://github.com/jed/lave/blob/master/lave.js#L65 use
options.generate
instead of justgenerate
?The text was updated successfully, but these errors were encountered: