I receive "ERROR: Port should be >= 0 and < 65536. Received NaN." on Elastic Beanstalk
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 32/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- javascript, node.js, postgresql
Research direction
Start with settings.json and the npx sequelize-cli db:migrate --env production entry point, then trace how the production database configuration is loaded and how the port value is parsed. Reproduce the Elastic Beanstalk setup using the reported Node, CLI, and ORM versions; done means the migration command accepts the configured port without producing NaN.
Written by the indexing model from the issue text.
Description
What you are doing?
I'm trying to run npx sequelize-cli db:migrate --env production on an Elastic Beanstalk Node.js instance. The database settings are
"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",
What is actually happening?
When I attempt to run the command, I get the following output
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.
I've logged process.env.RDS_PORT and am getting the following
console.log('process.env.RDS_PORT', process.env.RDS_PORT)
process.env.RDS_PORT 5432
Dialect: postgres
Sequelize CLI version: 6.6.0
Sequelize version: 6.21.0
- Dominant language
- JavaScript
- Stars
- 2.6k
- Forks
- 524
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from sequelize/cli
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 3/5 1-2 days Newbie friendliness 68/100
-
Difficulty 3/5 1-2 days Newbie friendliness 48/100
-
Difficulty 3/5 1-2 days Newbie friendliness 55/100
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
HarperFast/skills#96 ·
-
[Block] Latest Posts [Type] Bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Automattic/studio#4908 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
sugarlabs/musicblocks#8847 ·