Node.js(节点:12276)[Sequelize004]弃用警告
我是 当我试图运行Node.js(节点:12276)[Sequelize004]弃用警告,node.js,npm,nodemon,Node.js,Npm,Nodemon,我是 当我试图运行nodemon app.jssocioboard 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]
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,但在sequelize中仍然存在相同的问题
运算符别名
Sequelize允许将特定字符串设置为运算符的别名对于v5,这将给您提供弃用警告
您应该在
config.json
中为v4
设置“OperatorsAlias”:false
,而在v5+
中根本不设置它,因为如果这与socioboard api/用户安装相关,默认情况下它将为false
您应该编辑此配置,并根据错误注释“OperatorsAlias:false”,这是v5的无操作,应该删除
从错误中可以看出,这只是一个警告。。这不会停止您的应用程序,但您需要解决它。我在尝试使用MySQL呈现表时遇到了类似的问题。我可以通过在config.json文件中添加密码来解决问题。您是否正在使用MySQL或类似的软件,可能需要您输入密码?那么应该采用的方法是5.8.11版本