perfood / couch-auth

Powerful authentication for APIs and apps using CouchDB (or Cloudant) with Node >= 14
MIT License
66 stars 19 forks source link

TypeError: CouchAuth is not a constructor #42

Closed genpet closed 2 years ago

genpet commented 2 years ago

Hi, first of all thanks for this effort.

I followed the installation and it was installed successfully with no issues. Following the simple minimalist configuration that will get me up and running right away resulted in an error. I am using nodejs 16

var couchAuth = new CouchAuth(config); ^

TypeError: CouchAuth is not a constructor at Object. (/home/mar/myapp/app.js:44:17) at Module._compile (node:internal/modules/cjs/loader:1105:14) at Object.Module._extensions..js (node:internal/modules/cjs/loader:1159:10) at Module.load (node:internal/modules/cjs/loader:981:32) at Function.Module._load (node:internal/modules/cjs/loader:822:12) at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:77:12) at node:internal/main/run_main_module:17:47

fynnlyte commented 2 years ago

I fixed the example in the README. I was a bit premature with updating the names - the exported class is still called SuperLogin.

genpet commented 2 years ago

Thank you!!