title: escodegen.generate throws Error: Unknown node type: undefined
body: <p>The following is the code that I have written</p>
  
  <pre><code>`js
    var esprima = require('esprima');
    var escodegen = require('escodegen');
    var a = "var a = 2";
    var ast = esprima.tokenize(a);
    var output = escodegen.generate(ast);
    console.log(output);
  `
  </code></pre>
  
  <p>I am able to tokenize the code string but I am getting error generating the code back. I went through multiple samples, Everywhere the same pattern is followed. I don't understand what I am doing wrong.  </p>