-
Notifications
You must be signed in to change notification settings - Fork 290
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
Process.env undefined on few libs #2540
Comments
You could try to add a setter for {
let env = process.env;
Object.defineProperty(process, 'env', {
enumerable: true,
get() { return env; },
set(v) { console.trace('process.env is being set here'); env = v; }
});
} |
Thanks for you response but where i put this code? |
@3l0w Somewhere where there’s code that’s running while |
@3l0w |
Okay, then I don’t quite know what’s happening. Is (You can check using the same code as above, except with |
I try some test: |
There has been no activity on this issue for 3 years and it may no longer be relevant. It will be closed 1 month after the last non-automated comment. |
There has been no activity on this issue and it is being closed. If you feel closing this issue is not the right thing to do, please leave a comment. |
Version: 12.16.1 & 13.11.0
Platform: Linux ordi-msi 4.15.0-91-generic new design of error handling node#92-Ubuntu SMP Fri Feb 28 11:09:48 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
Subsystem:
What steps will reproduce the bug?
when i try to use a libs who use process.env.
I try with https://www.npmjs.com/package/fluent-ffmpeg
and https://www.npmjs.com/package/websocket
How often does it reproduce? Is there a required condition?
Every times on my laptop
What do you see instead?
With ffmpeg:
https://github.com/fluent-ffmpeg/node-fluent-ffmpeg/blob/master/lib/capabilities.js#L96
With webSocket:
https://github.com/visionmedia/debug/blob/master/src/node.js#L120
Additional information
Output of console.log(process.env) in the main file of my project is not undefined and has all env variable define.
The text was updated successfully, but these errors were encountered: