DeprecationWarning: A boolean value was passed to options.operatorsAliases. This is a no-op with v5 and should be removed

后端 未结 3 2213
执笔经年
执笔经年 2021-02-18 20:33

I\'m getting below error on expressJs with Sequelize

DeprecationWarning: A boolean value was passed to options.operatorsAliases. This is a no-op with v5 and shou         


        
相关标签:
3条回答
  • 2021-02-18 20:45

    Based on my experience

    Go to your file

    app\models\index.js

    const sequelize = new Sequelize(
    ...
        operatorsAliases: 0, // change this to zero
    
    ...
    );
    

    run again

    "node server.js"

    0 讨论(0)
  • 2021-02-18 20:52

    This is not an error, it's simply a warning stating that passing boolean values to operatorsAliases in sequelize options will be deprecated in v5.

    To remove the warning, replace the boolean value by '1' or '0' for true and false respectively.

    0 讨论(0)
  • 2021-02-18 21:01

    The operatorsAliases as a boolean no longer exists. If you were simply setting it to false before, you can completely remove operatorsAliases from your config. It only existed as a backwards compatibility option.

    0 讨论(0)
提交回复
热议问题