我收到“错误:端口应 >= 0 和 < 65536. Received NaN." on Elastic Beanstalk when using Sequelize CLI

问题描述 投票:0回答:0

我正在尝试在 Elastic Beanstalk Node.js 实例上运行

npx sequelize-cli db:migrate --env production
。数据库设置是

  "production": {
    "username": "process.env.RDS_USERNAME",
    "password": "process.env.RDS_PASSWORD",
    "database": "process.env.RDS_DB_NAME",
    "host": "process.env.RDS_HOSTNAME",
    "port": "process.env.RDS_PORT",

当我尝试运行命令时,我得到以下输出

npx sequelize-cli db:migrate --env production

Sequelize CLI [Node: 14.18.1, CLI: 6.6.0, ORM: 6.21.0]

Loaded configuration file "settings.json".
Using environment "production".

ERROR: Port should be >= 0 and < 65536. Received NaN.

我已经在我的应用程序的根目录中登录

process.env.RDS_PORT
并得到以下信息

console.log('process.env.RDS_PORT', process.env.RDS_PORT)
process.env.RDS_PORT 5432

我想知道如何解决这个问题。

方言: postgres

Sequelize CLI 版本: 6.6.0

续集版本: 6.21.0

node.js amazon-web-services sequelize.js amazon-elastic-beanstalk amazon-rds
© www.soinside.com 2019 - 2024. All rights reserved.