Closed zababurinsv closed 3 years ago
@pinata/sdk contains the following function:
function save(namespaces) {
if (namespaces) {
process.env.DEBUG = namespaces;
} else {
// If you set a process.env field to null or undefined, it gets cast to the
// string 'null' or 'undefined'. Just delete instead.
delete process.env.DEBUG;
}
}
This mutates process.env
, which is not supported by Parcel because it would break inlining environment variables.
@devongovett Is there any workaround for this?
We are hitting this issue as a chain of dependencies results into including the package https://www.npmjs.com/package/debug, which contains the same code listed on your reply.
This is currently blocking us from using Parcel, which we were hoping to use. And, I can imagine this issue might affect many other people, as there are almost 42k packages depending on debug.
Of course, it might be the case there's not a real reason to include the debug package to start with. But, we would need to chase quite a few package maintainers and convince them to change their dependencies. That's unlikely to happen (at least in the short-term).
Are you bundling for a browser target or node? It looks like there is a browser version that doesn't do that. The browser
field should automatically be picked up when building for a browser target. https://github.com/visionmedia/debug/blob/master/package.json#L55
I tried your suggestion and I can confirm, in my case, the issue went away after I built the app for a browser target. Thanks!
@devongovett , I'm working in a monorepo and bundling for a browser, but I'm seeing the following warning. I've found this which also outlines a similar issue. What can I try to resolve this issue?
@chriscanossi I'm facing the same issue.. Did you find any solution / workaround ?
@chriscanossi I'm facing the same issue.. Did you find any solution / workaround ?
@suleymangezsat, Unfortunately, no. Still seeing the verbose warning. It would nice to have an option to disable it.
š bug report
š Configuration (.babelrc, package.json, cli command)
.babelrc
package.json
cli command
š¤ Expected Behavior
Error
But server is working
šÆ Current Behavior
How can I remove the error?