Giter Club home page Giter Club logo

Comments (3)

mhamann avatar mhamann commented on August 20, 2024

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?

from nconf.

sploicers avatar sploicers commented on August 20, 2024

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 overrides and configDefaults are just a plain old objects, configFile is JSON, and the transformer function tries to strip off a certain prefix and returns false if it's not found. This is because we only want envars having that prefix to be in the store - interestingly this is true the first time that Env.loadSync() is called, but the second time it seems to include every envar that's set.

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 Provider.prototype.add is called with a name argument of 'env', the options object is undefined. The first time it is called it receives the options that I specify in the setup code.

from nconf.

mhamann avatar mhamann commented on August 20, 2024

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.

from nconf.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.