Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Node.js mssql error: tedious deprecated The default value for `config.options.enableArithAbort` will change from `false` to `true`

I get the error below. How do I fix it?

tedious deprecated The default value for `config.options.enableArithAbort` will change from `false` to `true` in the next major version of `tedious`. Set the value to `true` or `false` explicitly to silence this message. node_modules\mssql\lib\tedious\connection-pool.js:61:23

like image 822
Math Avatar asked Aug 20 '20 00:08

Math


2 Answers

Change your database config options to the following:

     var config = {
      user: 'username',
      password: 'password',
      server: 'localhost', 
      database: 'databasename',
      "options": {
        "encrypt": true,
        "enableArithAbort": true
        }
   };

read issue details here: https://github.com/tediousjs/node-mssql/issues/976

like image 147
MJ X Avatar answered Sep 28 '22 02:09

MJ X


instead of setting in config in your project, set the value in node_modules node_modules/sequelize/lib/dialects/mssql/connection-manager.js.

options: {
   enableArithAbort: true,//<----------set this to true
   port: parseInt(config.port, 10),
   database: config.database,
   trustServerCertificate: true
}
like image 39
Hossein Mirzaei Avatar answered Sep 28 '22 00:09

Hossein Mirzaei