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

问题描述 投票:1回答:3

我是当我尝试运行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,但仍然存在相同的问题

node.js npm nodemon
3个回答
1
投票

如果与socioboard-api /用户安装有关。。

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

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

从后继docs:

运营商别名

Sequelize允许将特定的字符串设置为运算符的别名。 使用v5,这将为您提供弃用警告 g。

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

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


1
投票

从后继docs:


0
投票

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

© www.soinside.com 2019 - 2024. All rights reserved.