Giter Site home page Giter Site logo

Comments (6)

af avatar af commented on July 3, 2024

My guess is that because you're setting your own NODE_ENV validator, the devDefault logic might be confused here. Does it work as expected if you remove the NODE_ENV key from your cleanEnv() call?

from envalid.

af avatar af commented on July 3, 2024

Closing until the info above is provided

from envalid.

veeramarni avatar veeramarni commented on July 3, 2024

@af yes it works fine without NODE_ENV but based on my understanding it should work when setting NODE_ENV.

from envalid.

veeramarni avatar veeramarni commented on July 3, 2024

@af, basically found out that default: 'production' in the NODE_ENV validator is not working. But when i set NODE_ENV=productionexternally it was working as expected.

from envalid.

af avatar af commented on July 3, 2024

Hmm, yeah, NODE_ENV is treated specially by envalid and it's probably causing this side-effect unfortunately. Since it looks like you only have the custom validator there in order to accept a 'staging' value, maybe we could have a extraNodeEnvValues option that lets you provide other valid values for NOD_ENV.

from envalid.

veeramarni avatar veeramarni commented on July 3, 2024

@af Did you plan to add extranodeEnvValues so we add some additional environments values such as staging?

from envalid.

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.