Node.js(节点:12276)[SEQUELIZE0004]弃用警告

Node.js (node:12276) [SEQUELIZE0004] DeprecationWarning

我是 当我尝试 运行 nodemon app.js socioboard-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,但仍然遇到同样的问题

来自续集docs:

运算符别名

Sequelize 允许将特定字符串设置为运算符的别名。 对于 v5,这会给您弃用警告g。

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

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

您应该编辑此配置 file 并根据错误 This is a no-op with v5 and should be removed

注释值“"operatorsAliases": false”

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

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