Error: Unknown network starting a bcoin node Getting an error Unknown Network running a bcoin node, but I'm not sure what's causing it since I'm defining the network very quickly.

Error Message:

(node:10579) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: Unknown network.
(node:10579) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.


Here is the bcoin script

var bcoin = require('bcoin').set('testnet');

(async () =&gt; {
  var full = new bcoin.node.FullNode({
    network: bcoin.network.get().toString(),
    httpPort: 18332,
    httpHost: '127.0.0.1',
    bip37: true,
    listen: true,
    passphrase: "secret",
    logLevel: "info",
    loader: require
  });

  if (!full.config.bool('no-wallet') &amp;&amp; !full.has('walletdb')) {
    const plugin = require('/Users/&lt;user&gt;/Projects/bcoin/lib/wallet/plugin');
    full.use(plugin);
  }
  await full.open();


  setUpWalletWatcher(full.pool, full.walletdb);
  await full.connect();
  await full.http.open();

  full.startSync();

})();
bcoin.network.get().toString()


returns main which is not a valid network string, it should be one of mainnet testnet simnet or regtest.