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

Strict mode warning still refers to NODE_ENV variable even if overriding with NODE_CONFIG_ENV is used #460

Closed
fedulovivan opened this issue Jan 9, 2018 · 5 comments

Comments

@fedulovivan
Copy link

When environment is overwritten via NODE_CONFIG_ENV, warning message should also consider this.

Given:
app is launched as
NODE_CONFIG_ENV=ut NODE_ENV=production node index.js
no configuration file at path config/ut.json

Actual message in console:
WARNING: NODE_ENV value of 'ut' did not match any deployment config file names.

Expected message:
WARNING: NODE_CONFIG_ENV value of 'ut' did not match any deployment config file names.

@markstos
Copy link
Collaborator

markstos commented Jan 9, 2018

And what is the version found in the ./node_modules/node-config/package.json that you are using? This is a new feature.

@fedulovivan
Copy link
Author

fedulovivan commented Jan 12, 2018

@markstos, Right I'm using latest version - 1.28.0 (which was actually upgraded namely for this new feature). But the problem is that current warning message may confuse user, since in situation when environment is defined via NODE_CONFIG_ENV, warning message still mentions NODE_ENV.

@markstos
Copy link
Collaborator

PR welcome.

@iCodeOkay
Copy link
Contributor

@markstos @fedulovivan - PR added 🙂

@lorenwest
Copy link
Collaborator

Published @3.2.3 - thanks!

markstos added a commit that referenced this issue Nov 20, 2020
FIX #460 - Strict mode warning refer to appropriate env variable
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants