Closed belo32 closed 3 years ago
so I was able to get it to work but I had to instantiate by calling new MSSQLStore.default(config, options)
How did you import MSSQLStore
in your file initially?
My guess is you used:
import MSSQLStore from 'connect-mssql-v2';
except, it would appear as though the default import wasn't setup as expected, hence why you where able to gain access using .default
Weird, I know we had this issue before and I thought we had resolved it. I'm guessing you're using Javascript and not Typescript so you're using the require
statement, not import
, is that correct?
Yes that's correct I'm using the require statement.
@belo32 what version of node and this package are you using together? Getting a reproduction will help with debugging 👍🏼
(also sorry for slow/late reply)
No problem, I'm using node v14.17.3 and v2.0.2 of connect-msql-v2
On Fri, Aug 13, 2021 at 5:30 PM Brad @.***> wrote:
@belo32 https://github.com/belo32 what version of node and this package are you using together? Getting a reproduction will help with debugging 👍🏼
(also sorry for slow/late reply)
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/JLuboff/connect-mssql-v2/issues/47#issuecomment-898730061, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJVVKXCEVOLC6EZ5R4L3RDT4WFH5ANCNFSM5BUJC6ZQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email .
Same problem for me, node: v16.7.0 and "connect-mssql-v2": "^2.0.2".
TypeError: The "config.options.database" property must be of type string.
at new Connection (C:\Users\Alin\Desktop\jwt-cookies\node_modules\tedious\lib\connection.js:411:17)
at C:\Users\Alin\Desktop\jwt-cookies\node_modules\mssql\lib\tedious\connection-pool.js:61:23
at new Promise (
TypeError: The "config.options.database" property must be of type string.
at new Connection (C:\Users\Alin\Desktop\jwt-cookies\node_modules\tedious\lib\connection.js:411:17)
at C:\Users\Alin\Desktop\jwt-cookies\node_modules\mssql\lib\tedious\connection-pool.js:61:23
at new Promise (
@belo32 @alinaugustin v3.0.0 is live on NPM. This should resolve the issue. Please let me know if you have any further trouble. I'm going to close this issue for now.
When implementing the example from the usage section in the Readme. I get the following error in the command line:
const store = new MSSQLStore(config, options) TypeError: MSSQLStore is not a constructor