title: How to use nanoid module on NodeJS?
body: <p>I know that maybe this question is very silly, but I can't make <a href="https://www.npmjs.com/package/nanoid" rel="noreferrer">nanoid</a> to work on my NodeJS app.</p>
  
  <p>I already read the docs.</p>
  
  <p>This is my app.js configuration:</p>
  
  <pre><code>var nanoid = require("nanoid");
  var ID = nanoid();
  </code></pre>
  
  <p>And I get the error message: </p>
  
  <pre><code>TypeError: nanoid is not a function
    at Object.&lt;anonymous&gt; (myapp.js directory)
  </code></pre>
  
  <p>Maybe I need to import the function inside nanoid but I dont know how to do it. Help would be appreciate.
  Thanks.</p>