Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Core v3 fails to start without an .env file #3929

Closed
adrian69 opened this issue Aug 4, 2020 · 1 comment
Closed

Core v3 fails to start without an .env file #3929

adrian69 opened this issue Aug 4, 2020 · 1 comment
Assignees

Comments

@adrian69
Copy link
Collaborator

adrian69 commented Aug 4, 2020

It seems v3 doesn't honor exported env vars and fails to start without an .env file.

Expected Behavior
It should use exported env vars (process.env):

bash-5.0$ env | grep CORE
CORE_API_PORT=4003
CORE_DB_DATABASE=core_devnet
CORE_DB_USERNAME=node
CORE_P2P_HOST=0.0.0.0
CORE_EXCHANGE_JSON_RPC_HOST=0.0.0.0
CORE_DB_PASSWORD=password
CORE_LOG_LEVEL=debug
CORE_WEBHOOKS_PORT=4004
CORE_LOG_LEVEL_FILE=info
CORE_P2P_PORT=4002
CORE_DB_HOST=postgres-devnet
CORE_ELASTICSEARCH_HOST=elastic-devnet
CORE_API_HOST=0.0.0.0
CORE_ELASTICSEARCH_PORT=9200
CORE_WEBHOOKS_HOST=0.0.0.0
CORE_EXCHANGE_JSON_RPC_PORT=8080

Current Behavior

It simply fails to start if there is no .env file with the following error:

Error: [ERROR] Unable to load the environment file. ENOENT: no such file or directory, open '/home/node/.config/ark-core/devnet/.env'
    at Fatal.render (/home/node/.config/yarn/global/node_modules/@arkecosystem/core-cli/dist/components/fatal.js:22:15)
    at ComponentFactory.fatal (/home/node/.config/yarn/global/node_modules/@arkecosystem/core-cli/dist/component-factory.js:118:54)
    at Command.run (/home/node/.config/yarn/global/node_modules/@arkecosystem/core-cli/dist/commands/command.js:124:29)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
 ✖  unhandledRejection (a promise was rejected but not handled)  Error: [ERROR] Unable to load the environment file. ENOENT: no such file or directory, open '/home/node/.config/ark-core/devnet/.env'
    at Fatal.render (/home/node/.config/yarn/global/node_modules/@arkecosystem/core-cli/dist/components/fatal.js:22:15)
    at ComponentFactory.fatal (/home/node/.config/yarn/global/node_modules/@arkecosystem/core-cli/dist/component-factory.js:118:54)
    at Command.run (/home/node/.config/yarn/global/node_modules/@arkecosystem/core-cli/dist/commands/command.js:124:29)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
@sebastijankuzner
Copy link
Contributor

Expected behavior is that node should not boot without .env file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants