Fixing a very common warning of Sequelize.js

12 February 2019

1 min read

We had this constant error showing up in our development logs :

squelize deprecated String based operators are now deprecated. Please use Symbol based operators for better security, read more at node_modules/sequelize/lib/sequelize.js:236:13

On simple google search, lead me to this huge issue on GitHub

Conversation over there is huge, there seems to be many potentials solutions, the ones which collaborators most suggested was to disable operator aliasing. So any string based operator will be disabled without any aliases instead symbol based built in operators will be used. This prevents cross site attacks.

1const sequelize = new Sequelize(config.databaseUrl, {
2  operatorsAliases: false,

Follow here for even in detail explanation.