jdesboeufs / connect-mongo

MongoDB session store for Express

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

this.searchParams.constructor undefined

wunaidage opened this issue · comments

  • I'm submitting a ...
    [x ] bug report
    [ ] feature request
    [ ] question about the decisions made in the repository
    [ ] question about how to use this project

  • Summary
    everything works on local, but when push to elastic beanstalk, following error happens

node ./bin/www
/var/app/current/node_modules/mongodb-connection-string-url/lib/index.js:152
Object.setPrototypeOf(this.searchParams, caseInsenstiveURLSearchParams(this.searchParams.constructor).prototype);
^
TypeError: Cannot read properties of undefined (reading 'constructor')
at new ConnectionString (/var/app/current/node_modules/mongodb-connection-string-url/lib/index.js:152:98)
at parseOptions (/var/app/current/node_modules/mongodb/lib/connection_string.js:186:17)
at new MongoClient (/var/app/current/node_modules/mongodb/lib/mongo_client.js:51:63)
at MongoClient.connect (/var/app/current/node_modules/mongodb/lib/mongo_client.js:295:24)
at new MongoStore (/var/app/current/node_modules/connect-mongo/build/main/lib/MongoStore.js:114:46)
at MongoStore.create (/var/app/current/node_modules/connect-mongo/build/main/lib/MongoStore.js:140:16)
at Object. (/var/app/current/packages/backend/app.js:58:23)
at Module._compile (node:internal/modules/cjs/loader:1376:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1435:10)
at Module.load (node:internal/modules/cjs/loader:1207:32)

  • Other information (e.g. detailed explanation, stack traces, related issues, suggestions how to fix, links for us to have context, eg. StackOverflow, personal fork, etc.)