apotdevin / thunderhub

ThunderHub LND Lightning Node Manager in your Browser
https://www.thunderhub.io/
MIT License
415 stars 88 forks source link

TypeError: Object.fromEntries is not a function #271

Closed rock217 closed 3 years ago

rock217 commented 3 years ago

Describe the problem/bug Initial page request crash

Your environment

To Reproduce Steps to reproduce the behavior:

  1. npm start -- -p 3000
  2. localhost:3000

Expected behavior See a login page or the dashboard

Actual behavior internal server error

Screenshots/Links

TypeError: Object.fromEntries is not a function
    at resolveEnvVarsInAccount (/root/thunderhub/.next/server/pages/_app.js:2680:27)
    at getParsedAccount (/root/thunderhub/.next/server/pages/_app.js:2874:27)
    at accounts.map (/root/thunderhub/.next/server/pages/_app.js:2960:59)
    at Array.map (<anonymous>)
    at getAccountsFromYaml (/root/thunderhub/.next/server/pages/_app.js:2960:35)
    at getAccounts (/root/thunderhub/.next/server/pages/_app.js:2871:10)
    at Module.fbJj (/root/thunderhub/.next/server/pages/_app.js:5653:109)
    at __webpack_require__ (/root/thunderhub/.next/server/pages/_app.js:23:31)
    at createIsomorphLink (/root/thunderhub/.next/server/pages/_app.js:1440:9)
    at createApolloClient (/root/thunderhub/.next/server/pages/_app.js:1453:11)

Additional context

.env.local
ACCOUNT_CONFIG_PATH='/root/thunderhub/config.yaml'
config.yaml
masterPassword: xxxx-autohashed
defaultNetwork: 'mainnet'
accounts:
  - name: 'xxxx'
    serverUrl: '127.0.0.1:9735'
    lndDir: '/root/.lnd'
    macaroonPath: '/root/.lnd/data/chain/bitcoin/mainnet/admin.macaroon'
    certificatePath: '/root/.lnd/tls.cert'
    password: xxxx-autohashed
apotdevin commented 3 years ago

That's a deprecated version of node. I recommend updating to at least version 14