You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
TypeError: The "config.options.textsize" property must be of type number or null. #873
After installing version 5 of tedious/mssql, I am facing an issue while connecting to database. Following error is received,
Looks like somewhere in your code config.options.textsize is set as string or something else, which should be either integer or null.
error: Error connecting database! {"timestamp":"2019-02-28T11:31:14-08:00"}
TypeError: The "config.options.textsize" property must be of type number or null.
at new Connection (/Users//node_modules/tedious/lib/connection.js:589:17)
at base.Promise (/Users//node_modules/mssql/lib/tedious.js:237:23)
at new Promise ()
at ConnectionPool._poolCreate (/Users//node_modules/mssql/lib/tedious.js:195:12)
at ConnectionPool._connect (/Users//node_modules/mssql/lib/base.js:244:10)
at ConnectionPool.connect (/Users//node_modules/mssql/lib/base.js:214:12)
Hi @charutiwari04, I just checked the code, I think the comment from the #799 looks correct. The default value for the textsize is actually set to a string. We will raise a bug on our side, and fix the issue. Thanks for raising this.
This still seems to be an issue in version 11.4.0. In connection.ts within the master branch src directory, I see textsize getting set to a string by default. Then, a validation check occurs on line 1643 that makes sure it's a number which fails. What version should I be using of mssql/tedious to avoid this issue? Thanks.
Hi @russell640, The textsize should be a string type like the documentation says. The validation check that occurs on line 1643 seems off. I will double-check this with @arthurschreiber, and we can create a PR for fixing this ASAP.
Hi @russell640, we just made PR #1309. You can take a look and see if this solves your problem. Also, we will make a fix for the documentation page as well.
Activity
MichaelSun90 commentedon Mar 8, 2019
Hi @charutiwari04, I just checked the code, I think the comment from the #799 looks correct. The default value for the textsize is actually set to a string. We will raise a bug on our side, and fix the issue. Thanks for raising this.
IanChokS commentedon Dec 13, 2019
Hi @charutiwari04, thanks for raising this issue. I've clarified that the
config.options.textsizeis set by typestringin the documentation .russell640 commentedon Jul 28, 2021
This still seems to be an issue in version 11.4.0. In connection.ts within the master branch src directory, I see textsize getting set to a string by default. Then, a validation check occurs on line 1643 that makes sure it's a number which fails. What version should I be using of mssql/tedious to avoid this issue? Thanks.
MichaelSun90 commentedon Jul 29, 2021
Hi @russell640, The textsize should be a string type like the documentation says. The validation check that occurs on line 1643 seems off. I will double-check this with @arthurschreiber, and we can create a PR for fixing this ASAP.
MichaelSun90 commentedon Aug 4, 2021
Hi @russell640, we just made PR #1309. You can take a look and see if this solves your problem. Also, we will make a fix for the documentation page as well.