How can we create a user with Firebase Auth in node.js?
<p>I'm trying to create user account using Firebase auth in nodejs. It doesn't work and I don't know why. Here's the code and the error generated by nodejs:</p>

<pre><code>var config = {.......}; // i can't share the config

var app = firebase.initializeApp(config);

var db = app.database();
var auth = app.auth();

auth.createUserWithUsernameAndPassword("anemail@gmail.com", "@NewPassWord").then(
    function(user){ console.log(user);},
    function(error){ console.error(error);}
);
</code></pre>

<p>Error generate by NodeJS:</p>

<pre><code>TypeError: Object [object Object] has no method 'createUserWithUsernameAndPassword'
    at Object.&lt;anonymous&gt; (/home/antonio/Projects/firebase/app.js:20:6)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Function.Module.runMain (module.js:497:10)
    at startup (node.js:119:16)
    at node.js:906:3
</code></pre>