I'm really confused about environment variables right now.
- If I run
PORT=1234 node .
it ignores PORT and uses the default. - If I then run vim, write one of the js files (with no changes, but I have to write it) and close it and run
PORT=1234 node .
again, it works and runs on1234
. - If I then run
PORT=4321 node .
it ignores the new PORT and continues to run on1234
. - If I repeat the process of opening vim, writing a file, and closing vim and running node again, it uses
4321
. - I'm seeing this on two different servers and it's affecting other things on
process.env
, likeNODE_ENV
and the app's version number which I put there when it first starts - I DON'T see this behavior when I just run
PORT=xxxx node
and then interactively ask it whatprocess.env.PORT
is
later... omg, babel was caching the env variables in /tmp/.babel.json
and checking out new code wasn't resetting it
Babel's driving me crazy right now. 6 has been a huge pain to set up (I haven't gotten it working with this project yet). I had to clone an old version of the docs so I could read them. They deleted all the issues from the github page, so all the google search results are now broken. And all the new plugins are separate npm packages but they don't link to real github repos
It's probably because I'm using the 'inline env vars' plugin, which speeds up react a lot.
But it was not at all obvious that babel ever cached _anything_, and it's misleading that it doesn't put that file right in your project directory
I'm starting to wonder if they're shooting themselves in the foot by breaking every setting out into a separate plugin. That's millions of combinations (or permutations?) to test. it's basically impossible to test them in combination except maybe a few presets. For example, blacklisting he lexical scoping plugin breaks the tail call optimization function, but only for some recursive calls. That's crazy complexity to take on. I think I'd rather have a really solid, nearly config-free 6to5 compiler, then maybe chain it on to a moe experimental but simpler 7to6 compiler. You could still even have a super experimental 8to7, but you couldn't turn on half of each..