-
-
Notifications
You must be signed in to change notification settings - Fork 88
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
Reliance on process.env.NODE_DEBUG
#77
Comments
This is a node module; they always exist. If vite doesn’t provide then, it’s not a node module bundler. |
For people who see this in the future, there's also #43 which discusses this in more detail, and provides solutions for different tools which aren't node module bundlers. |
That's not a good reason for not including a simple check like
Just because this may be a The README also states
edit |
Yes, it does mean that. An X module only ever runs in X, or in X-like environments. |
@ljharb If it always exists, then may be we should remove these checks for Lines 76 to 82 in ef98472
I don't understand the rigid behavior of denying to add a simple safety check. 🤷♂️ #62 should have been merged a long time ago. At least, it doesn't hurt or break anything. |
@manzoorwanijk true, we should remove those. What it harms is that it furthers the tolerance of broken bundlers in the ecosystem. |
This code will fail if
process
orprocess.env
does not exist:node-util/util.js
Lines 109 to 110 in 6b82825
We ran into this with vite.js 2.8.x which has another convention (https://vitejs.dev/guide/env-and-mode.html#env-variables).
node-util should probably have a safe fallback for when this environment variable does not exist (assume production build?).
We used a workaround described here: visgl/deck.gl#6134 (comment)
The text was updated successfully, but these errors were encountered: