【问题标题】:Node.js (node:12276) [SEQUELIZE0004] DeprecationWarningNode.js (node:12276) [SEQUELIZE0004] DeprecationWarning
【发布时间】:2020-02-01 21:10:06
【问题描述】:

我是 当我尝试运行 nodemon app.jssocialboard-api/user 时,出现以下错误

[nodemon] 1.19.3
[nodemon] to restart at any time, enter `rs`
[nodemon] watching dir(s): *.*
[nodemon] watching extensions: js,mjs,json
[nodemon] starting `node app.js`
(node:1220) [SEQUELIZE0004] DeprecationWarning: A boolean value was passed to options.operatorsAliases. This is a no-op with v5 and should be removed.

我使用了 PowerShell 和 CMD,但仍然遇到同样的问题

【问题讨论】:

    标签: node.js npm nodemon


    【解决方案1】:

    我在尝试使用 MySQL 渲染表时遇到了类似的问题。我可以通过在我的 config.json 文件中添加密码来解决我的问题。您是否使用 MySQL 或其他可能需要您输入密码的工具?

    【讨论】:

      【解决方案2】:

      如果这与 socialboard-api/user 安装有关..

      您应该编辑此配置 file 并根据错误 This is a no-op with v5 and should be removed 注释值““operatorsAliases”:false”

      正如您从错误中看到的那样,它只是一个警告......这不会停止您的应用程序,但您需要解决它。

      【讨论】:

        【解决方案3】:

        来自续集docs:

        运营商别名

        Sequelize 允许将特定字符串设置为运算符的别名。 在 v5 中,这将向您发出弃用警告

        您应该在config.json 中为v4 设置"operatorsAliases": false,而不是在v5+ 中设置它,因为它默认为false

        【讨论】:

        猜你喜欢
        • 2018-02-11
        • 2021-08-15
        • 1970-01-01
        • 2019-04-24
        • 1970-01-01
        • 2020-07-08
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多