I am unable to connect my node application using sequelize to connect to SQL Server database on node 18 environment. It is connecting fine on node 16 .
my package-json
"dependencies": {
"cookie-parser": "~1.4.6",
"debug": "~4.3.4",
"express": "~4.18.1",
"http-errors": "~2.0.0",
"jade": "~1.11.0",
"morgan": "~1.10.0",
"sequelize": "^6.0.0",
"tedious": "^8.3.0"
}
let sequelize = new Sequelize('database', 'username', 'passoword', {
host: '192.168.106.10',
dialect: 'mssql',
logging: console.log,
driver: 'tedious',
pool: {
max: 100,
min: 0,
idle: 10000
},
'options':{'encrypt':false}
});
sequelize.authenticate().then(() => {
console.log('Connection to database has been established successfully.');
}).catch(err => {
console.log('Unable to connect to database:', err);
});
My guess is that it is due to version incompatibility, any help is highly appreciated.