-
Notifications
You must be signed in to change notification settings - Fork 255
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
'Env' Store is Loaded Twice #363
Comments
Thanks for reporting this @sploicers. Are you seeing it called twice in sequence or interspersed between calls from other stores? Can you also describe in more detail about your setup and what you're providing at each stage of the hierarchy? |
Hi, no worries 😄 I'm seeing it interspersed between calls from other stores. This is code from work (which is already partially obfuscated for this post) so can't post too much more detail about it, except that Setup-wise it's a Node/Express service running on Node 12, under Mac OS Catalina 10.15.7. As an update, I've just seen that the second time |
I potentially just ran into this same issue on a project I was working on last week. I'm not sure what would cause it off-hand, but it definitely needs further investigation. Hoping I can get time to do that soon, but would welcome anyone else doing some digging and submitting a PR with a fix. |
Exactly as the title says - when I configure Nconf with the code below I can verify that
Provider.prototype.add
is called with the 'name' argument set to 'env' two times. This results in some of my environment variables getting clobbered and not ending up in the finally built store.The following breakpoint (placed in
provider.js
of the Nconf source code) is what I used to demonstrate this:The configuration that I'm using to reproduce this is:
I have verified that the block of code above is only hit once.
npm list nconf
tells me I am on version 0.10.0.The text was updated successfully, but these errors were encountered: