Getting an error in
node defaultdatabase.js:
TypeError: Cannot read property 'bind' of undefined
at Object. (/var/www/nodeapp/node-confbridge-js/scripts/defaultdatabase.js:7:38)
at Module._compile (internal/modules/cjs/loader.js:778:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
at Function.Module.runMain (internal/modules/cjs/loader.js:831:12)
at startup (internal/bootstrap/node.js:283:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:623:3)
I got the exact same Error. Any fix or workaround for this?
Thanks.
Ubuntu 20.04.3 LTS
Edit: Apparently there is a newer version of npm pg module (v. 7.0.0). On newer versions "pg.connect" has been hard-deprecated in favor of pg.Pool(...).connect(...). If you use pg v.6 the Error disappears.
npm install pg@6
Source