NODE_ENV mismatch
Hello there!
I'm developing an app with electron and I have my own custom environment variables.
Running any request to the paperspace api with my own NODE_ENV creates an error in line 14 of client.js:
var nodeEnv = processEnv.NODE_ENV;
var config = configInfo[nodeEnv || 'production'];
Throwing this:
TypeError: Cannot read property 'host' of undefined
because I don't have a custom .host variable in my environment variable.
I got to pass the error by specifying production always:
var config = configInfo['production'];
I'm not sure if this is the intended behavior. If not, I can submit a PR to fix this
We left this in for local debugging during development, but didn't think about it conflicting with other developers. Sorry about that. A better fix might be to check for a list of explicit values, e.g. 'production', and default to 'production' if we don't recognize the NODE_ENV value.
What value are you setting NODE_ENV to?
I'm setting NODE_ENV to development because I have another process that uses that to minify and preprocess files.