user52933: https://github.com/seegno/bitcoin-core
After using npm to install, I get an auth error when I try to run it.
The github repo isn't clear how to auth...
const Client = require('bitcoin-core');
const client = new Client({ network: 'mainnet' });

client.getInfo().then((help) => console.log(help));

I was able to auth using the older package: https://github.com/freewil/node-bitcoin
Using but with my own credentials:
var client = new bitcoin.Client({
  host: 'localhost',
  port: 8332,
  user: 'username',
  pass: 'password',
  timeout: 30000
});

Really lost how to do it on the newer one.

user56518: I tried the following, and it works:
const Client = require('bitcoin-core');

const client = new Client(
    {   
        username: 'yourUsernameHere',
        password: 'yourPasswordHere',
        port: '8332'
    }
);

client.getInfo().then((help) => console.log(help));


52933: <p><a href="https://github.com/seegno/bitcoin-core" rel="nofollow noreferrer">https://github.com/seegno/bitcoin-core</a>
After using npm to install, I get an auth error when I try to run it.
The github repo isn't clear how to auth...</p>

<pre><code>const Client = require('bitcoin-core');
const client = new Client({ network: 'mainnet' });

client.getInfo().then((help) =&gt; console.log(help));
</code></pre>

<p>I was able to auth using the older package: <a href="https://github.com/freewil/node-bitcoin" rel="nofollow noreferrer">https://github.com/freewil/node-bitcoin</a></p>

<p>Using but with my own credentials:</p>

<pre><code>var client = new bitcoin.Client({
  host: 'localhost',
  port: 8332,
  user: 'username',
  pass: 'password',
  timeout: 30000
});
</code></pre>

<p>Really lost how to do it on the newer one.</p>
 56518: <p>I tried the following, and it works:</p>

<pre><code>const Client = require('bitcoin-core');

const client = new Client(
    {   
        username: 'yourUsernameHere',
        password: 'yourPasswordHere',
        port: '8332'
    }
);

client.getInfo().then((help) =&gt; console.log(help));
</code></pre>
